Well, the high energy and heat found in the photons of sunlight allow plants to make their own food, sustaining them long enough to be eaten by us, or to be eaten by animals about to be eaten by us. Plus we get direct warmth from the sun. These things mean that the sun is what keeps all organisms alive in the first place.
The sun provides energy through light radiation. This helps plants by providing them with the energy to convert carbon dioxide into sugars, which is how they grow. The sun helps humans in a variety of ways, but most importantly by fueling plant growth, so we can eat the plants and the other animals that eat the plants.
Every ecosystem is made up of a variety of living and nonliving things. The living things within an ecosystem depend on each other to obtain their energy.