Earth's warmth depends on losing energy, not hoarding it. Nearly as much energy leaves the planet for space as arrives from the Sun, yet that balance does not dictate a cold surface. The answer lies in how the atmosphere handles radiation on its journey outward. That journey takes time.
The Sun supplies almost all the energy that powers Earth's surface. Its radiation drives weather and climate, while photosynthesis captures a small share to build the matter that sustains much of life. About a third of incoming sunlight is reflected by clouds, ice and other surfaces; the rest is absorbed by the atmosphere, land and oceans. Earth pays the energy bill in infrared radiation. But the atmosphere is no transparent window at those wavelengths: greenhouse gases, including water vapor and carbon dioxide, absorb and emit infrared energy, sending some toward the surface as well as upward.
The distinction between surface temperature and the temperature at which Earth radiates to space is the heart of the matter. Without the natural greenhouse effect, Earth's average surface temperature would be roughly minus eighteen degrees Celsius, rather than about fifteen degrees Celsius. Energy can escape through higher, colder layers of the atmosphere, while the surface below remains warmer. Balance is not fixed. As greenhouse gas concentrations rise, outgoing radiation initially falls relative to incoming energy, and the planet warms until that gap narrows. Meanwhile, liquid water persists under a sky that gives back some of the heat it takes.