The process by which some, photosynthetic, organisms use the energy of sunlight to produce sugars.
All organisms need energy, food, to survive, but only plants, algae, and some bacteria are able to produce it themselves. They use the Sun's energy to make glucose (a carbohydrate) from water (H2O) and carbon dioxide (CO2). The process also produces the oxygen humans and other organisms breathe.
6H2O + 6CO2 → C6H12O6+ 6O2
Plants catch the energy of sunlight in a pigment in their leaves, chlorophyll, which makes them green.
Like other organisms, plants will use some of the glucose themselves through respiration. But a large part of the energy trapped by photosynthetic organisms is eventually transferred to other organisms, herbivores, which eat plants and algae.
Therefore, almost all living organisms directly or indirectly depend on photosynthesis. Animals, which cannot photosynthesize themself, depend on photosynthetic organisms for food.
Through photosynthesis, CO2 is removed from the atmosphere and built into organic matter, for example trees. When trees die and decomposes the carbon is eventually released back into the atmosphere. This is a natural part of the carbon cycle.
If the balance between photosynthesis and respiration is changed it could influence global warming. Destruction of forests would increase the content of CO2 in the atmosphere. On the other hand, increased photosynthesis, i.e. more plants, would help reduce the amount of CO2 in the atmosphere.