Here's why:
* Sunlight and Heat: Sunlight contains energy in the form of radiation, which can pass through the atmosphere relatively easily. When this radiation reaches Earth, it is absorbed by the surface, warming the planet.
* Infrared Radiation: As Earth warms, it emits heat energy as infrared radiation.
* Greenhouse Gas Absorption: Greenhouse gases in the atmosphere, such as carbon dioxide, methane, and water vapor, absorb this infrared radiation.
* Trapped Heat: This absorption prevents the infrared radiation from escaping back into space, effectively trapping heat in the atmosphere and contributing to the greenhouse effect.
Think of it like a greenhouse: the glass roof allows sunlight in, but it traps the heat inside, making the greenhouse warmer than the outside air.