Organisms which decompose the dead remains of plants and animals are called decomposers. Bacteria and fungi play the role of decomposers.
Decomposers decompose dead remains of plants and animals. By doing so, they serve two purposes.
One, they reduce the burden on the environment by clearing dead remains.
Two, they channelize the raw materials back to the environment.
Hence, if there were no decomposers in the environment it would lead to accumulation of dead plants and animals in the environment. Additionally, the environment would be finally sapped of all its resources which are needed to maintain and sustain life.