Fungi play a crucial role in nutrient cycling by breaking down organic matter, such as dead plants and animals, into simpler compounds. This decomposition process releases nutrients back into the soil, making them available for other organisms to use. Fungi also form symbiotic relationships with plant roots, such as mycorrhizae, which help plants absorb nutrients from the soil more efficiently. Overall, fungi help maintain nutrient balance in ecosystems through their decomposition and mutualistic relationships with other organisms.