The sun radiates a lot of things we need like vitamin D and heat. It also is the energy source of organisms that survive off of photosynthesis, like plants, which we or other consumers eat.
It's like this:
Sun--->Producers (Plants and Protists) ---> Consumers (animals and humans) ---> Decomposers (mostly bugs, bacteria, and fungi)