The planet Mercury cools to -300F at night. But the earth, which is twice as far from the sun, is warm at night. The atmosphere acts like blanket, or a greenhouse. It scatters heat, making it harder for heat to escape, just as during the day it scatters sunlight, making the sky blue. In space, beyond the atmosphere, the sky is black.
Many molecules scatter heat. Water scatters heat as does carbon dioxide. Because of the burning of coal and oil, carbon dioxide concentrations have been increasing much faster than have concentrations of other compounds. One ton of coal creates three tons of CO2, and we have burned truckloads and trainloads and mountains of coal recently.
An increase of average temperature of a few degrees corresponds to a large increase in energy in the atmosphere.
I believe in global warming. Do you?