In a process called “photosynthesis,” plants use the energy in sunlight to convert CO2 and water to sugar and oxygen. The plants use the sugar for food; food that we use, too, when we eat plants or animals that have eaten plants and they release the oxygen into the atmosphere.
So it’s PHOTOSYNTHESIS