The greenhouse effect is a natural phenomenon that is vital to life on Earth. The sun irradiates the Earth and about 70% of the incoming radiation is absorbed by gases (water vapour, carbon dioxide, nitrous oxide, and methane, for example) in the atmosphere and by the planet’s surface. The result is similar to the action of a greenhouse where warm air is held inside the greenhouse.
The average temperature of the Earth’s atmosphere is raised by the energy trapped by these gases, maintaining the Earth’s temperature within a tolerable range. This phenomenon is known as the “greenhouse effect” and causes the earth’s surface to be about 33°C warmer than it would be otherwise. The most predominant greenhouse gases (GHG) are water vapour (H2O) and carbon dioxide (CO2). Other greenhouse gases include chlorofluorocarbons (CFCs), methane (CH4), nitrous oxide (N²O) and ozone (O3). CO2 is the most important GHG because of its long life span in the atmosphere.

source: The Intergovernmental Panel on Climate Change (IPCC)