Plants do photosynthesis using sunlight and yield us vegetables, fruits and grains. Humans and animals eat this produce and get energy.
Sun's heat causes rain and wind. We derive electrical energy using wind mill. We generate electricity using fast flowing water.
The plants and the animals that were buried deep inside the earth millions of years ago, have turned into coal and oil due to pressure and heat. They are the best sources of energy even today.
Today we directly derive electrical energy from solar power and it is one of the best renewable energy. A solar powered plane has already circumvented the earth.
No wonder that our ancestors had worshiped sun as a god.