The sun is the ultimate source of almost all kinds of energy on earth, either directly or indirectly. Fossil fuels (coal, oil and gas) are the transformed forms of plants (and animals) which once lived on the earth and grew capturing the energy of the sun. Biomass is a product of photosynthesis where the sun has the major role.
Solar energy is increasing becoming an important source of renewable energy. Hydro-electricity depends upon the water cycle which again is dependent on solar radiation. Similarly, wind energy, tidal power, wave power all, in some way or other, and depend on the sun.
The sun is an extremely hot mass of gas, where continuous thermo-nuclear reaction is taking place producing enormous quantities of heat and light. The sun radiates energy in the form of heat and light in all directions. Only a very small part of this energy is intercepted by our planet earth.