Water is the ultimate source of energy.
Sun is the ultimate source of all energy. This is because the energy from the sun is what drives all the life on earth in the first place. Without the sun, there would be no life.
Fossil fuels (coal, oil and gas) are extracted from the transformed forms of plants (and animals) which once lived on Earth and grew capturing the energy of the Sun. Hydro-electricity depends upon the water cycle which again is dependent on solar radiation. Similarly, wind energy and other forms of energy in some way or another, depend upon the Sun.