What is the source of energy for nearly all life on earth?

The source of energy for nearly all life on Earth is the Sun. Sunlight is photosynthesized by plants and other photosynthetic organisms to produce glucose (sugar). This glucose is then used as an energy source by these organisms and also serves as a primary source of energy for other non-photosynthetic organisms, including humans, through the consumption of plants or other animals. Thus, the Sun's energy ultimately sustains almost all life on Earth.