Fungi play a crucial role in nutrient cycling by breaking down organic matter such as dead plants and animals. They decompose this material, releasing nutrients like nitrogen, phosphorus, and carbon back into the soil for plants to use. Fungi also form beneficial relationships with plant roots, helping them absorb nutrients more efficiently. Overall, fungi are essential in maintaining nutrient balance in ecosystems.