Earth’s energy source is the sun, which provides nearly all of the earth’s energy in the form of solar radiation, which includes light, heat, and UV radiation.
Before plants, algae and phytoplankton used water for photosynthesis, and bacteria used H2S and other organic compounds to turn CO2 into organic compounds.
The start of photosynthesis was a turning point for Earth’s history, slowly changing the Precambrian atmosphere into the oxygen-rich environment we have today.