Decomposers break apart complex organic materials into more elementary substances: water and carbon dioxide, plus simple compounds containing nitrogen, phosphorus, and calcium. All of these components are substances that plants need to grow.
Some decomposers are specialized and break down only a certain kind of dead organism. Others are generalists that feed on lots of different materials. Thanks to decomposers, nutrients get added back to the soil or water, so the producers can use them to grow and reproduce.