In photosynthesis, plants constantly absorb and release atmospheric gases in a way that creates sugar for food. Carbon dioxide goes in the plant's cells; oxygen comes out. Without sunlight and plants, the Earth would become an inhospitable place unable to support air-breathing animals and people.
TL;DR (Too Long; Didn't Read)
Photosynthesis takes carbon dioxide out of the atmosphere and puts oxygen into it.
Earth's Layered Atmosphere
The atmosphere is stratified into a number of different layers, each with a slightly different composition and physical characteristics. All biological organisms live in the lowest level of the atmosphere, the troposphere, which extends from ground level to between 9 kilometers (5.6 miles) and 17 kilometers (10.6 miles). The troposphere consists mainly of nitrogen, oxygen, argon and carbon dioxide. Photosynthesis helps regulate the quantities of oxygen and carbon dioxide in the atmosphere.
The Photosynthesis Reaction
The majority of plants and some specialized bacteria carry out photosynthesis, whose chemical equation is:
Carbon dioxide + Water = Glucose + Oxygen
Chlorophyll, a molecule found in the leaves of plants, is essential to photosynthesis. This molecule captures the energy from sunlight and allows the photosynthesis reaction to take place. Convention states that chlorophyll and sunlight should not be written on either side of the equation. Instead, you can think of chlorophyll as a catalyst that uses sunlight to speed up the reaction.
Oxygen and the Early Earth
The atmosphere of the early Earth, which differed dramatically from that of today, consisted of water vapor, carbon dioxide and ammonia. It was not until the evolution of cyanobacteria (photosynthetic bacteria) that oxygen was released into the atmosphere. Over billions of years, photosynthesis led to an increase of oxygen in the atmosphere. Today, oxygen makes up approximately 21 percent of the atmosphere, and it is the intricate balance between photosynthesis and respiration that keeps it at a constant level.
Carbon Dioxide and Earth's Temperature
Greenhouse gases absorb radiation from the sun and maintain the temperature of the Earth. Carbon dioxide is one of the most important greenhouse gases in the atmosphere, and an increase in CO2 will likely lead to a change in the Earth's global temperature. Photosynthetic organisms play the essential role of helping to keep carbon dioxide levels relatively constant, thereby maintaining the Earth's temperature. Since the Industrial Revolution, mankind has been pumping large quantities of carbon dioxide into the atmosphere through the burning of fossil fuels. This ramped up the greenhouse effect, expected to increase global temperature by 2 to 3 degrees Celsius (3.6 to 5.4 degrees Fahrenheit) over the next few decades.