Fungi play a crucial role in nutrient cycling in ecosystems by breaking down organic matter such as dead plants and animals. This decomposition process releases nutrients like carbon, nitrogen, and phosphorus back into the soil, making them available for other organisms to use. Additionally, fungi form symbiotic relationships with plant roots, known as mycorrhizae, which help plants absorb essential nutrients from the soil. Overall, fungi are essential for recycling nutrients and maintaining the health of ecosystems.