The biosphere's a battery charged by the sun. Tiny green spheres called cyanobacteria--and their descendants, known as chloroplasts, which inhabit every photosynthesizing cell in a green plant--use energy from photons that the sun is constantly hurling at us to pull electrons off of the oxygen atoms in H2O to power their manipulations of CO2 they absorb from the air. Oxygen is very "electronegative," which means it badly wants those electrons back, so the chloroplasts spit the oxygens out in order to keep the electrons they've harvested where they belong (on the carbon atoms left behind from the CO2). This allows them to proceed with their beautiful and intricate building process.

This process has allowed a huge amount of free oxygen to build up in Earth's atmosphere over time. Given the choice, these oxygens would love to draw these electrons as close to them as physically possible, and the feeling is mutual.  Bring a free oxygen near a substance with electrons that aren't too tightly bound, add a little energy or a catalyst to "get over the hill" so to speak, and you'll quickly get chemical reactions that rearrange the electrons into states that snuggle them right up against those affectionate oxygen atoms. This releases energy that had been stored in the electrostatic potential between them. Energy properly harnessed can be used to do work. Is it possible to harness the energy that comes from oxygen snapping up those electrons?

Oh yes. In fact, all complex multicellular life relies on undoing this separation process that plants carry out. By carefully and conscientiously breaking the process of reunion into as many steps as possible--gradually bringing an electron closer and closer to an oxygen atom and meticulously squirreling away the energy so liberated at each increment--heterotrophs can squeeze all of the sunlight right back out of the plants and plant-eaters and plant-eater-eaters (etc.) that they eat. The yearning of a few oxygens and a few electrons for one another is satisfied, and Earth's biospheric battery is locally and temporarily discharged to power the lumbering activities of a mass of trillions of tiny kinks in the lithosphere-atmosphere interface.