Sunlight is very important. Most of the energy that use is from the sun (either directly or indirectly). Fossil fuels was the change from living material to fuel, and those living material would have had the energy when they were alive and eating plants (which takes the energy from the sun through photosynthesis).
Other forms of energy including wind energy, wave energy hydroelectric also indirectly relate to the sun. The wind is caused by the convection current from the difference in temperature (heated up by the sun), which then causes waves to form on the surface of the sea. Hydroelectric is caused by the evaporation of water into clouds, then condensation into the top of the mountains where when it runs down the river, we can harness the energy.
Just remember that tidal energy is not from the sun, it's due to the gravitational force from the moon
Just remember that tidal energy is not from the sun, it's due to the gravitational force from the moon