In addition to providing the oxygen and carbon dioxide necessary to support life on Earth, the atmosphere also blocks harmful radiation from the sun and traps heat to make the surface of the planet habitable. Without the atmosphere, the Earth's environment would resemble that of the moon.
The atmosphere primarily contains a mix of nitrogen and oxygen, with carbon dioxide, argon and a few trace elements thrown in. The oxygen and carbon dioxide help maintain a symbiotic balance between animals and plants. Plants need carbon dioxide to photosynthesize, which produces oxygen as a waste product. Animals need oxygen to breathe, which releases carbon dioxide.
The planet's atmosphere also helps block dangerous cosmic radiation. The sun puts out an enormous amount of energy in a range of frequencies that are dangerous to living things. At the highest reaches of the atmosphere, dense ozone molecules help absorb this radiation and block it from reaching the surface. The ozone layer has been depleted by human activity and gaps in its protection threaten animals and plants in the southern reaches of the globe.
The energy that passes through the atmosphere reaches the surface, where it is partially absorbed as heat. The reflected energy and heat is trapped by the dense atmosphere, spreading the warmth around the globe. Without the atmosphere's greenhouse effect, the surface of the Earth would be much colder, especially on the night side of the planet.