Fungi play a crucial role in decomposition by breaking down organic matter such as dead plants and animals. They release enzymes that help break down complex molecules into simpler compounds, which can then be further broken down by other decomposers like bacteria. This decomposition process releases nutrients back into the soil, making them available for plants and other organisms to use.