Fortunately, the atmosphere does not let all of the heat out, instead much of it is absorbed by the atmosphere and is radiated back to Earth. Some of these do act as greehouse gasses, others do not. Why and how they differ depends on their molecular structure and, in particular, their shape. In determining molecular shape, start with the Lewis structure. A second example given in the text is water.
Water has a central oxygen atom and is bound to two other, hydrogen, atoms.
The central oxygen also has two lone pairs. Thus the two hydrogens get pushed closer together than they normally would be. Following these guidelines, we predict that carbon dioxide is linear and ozone is bent. We know from previous discussions that radiation can interact with matter in many different ways. If the energy is high enough, bonds can be broken as the energy is absorbed.