Answer
In a conventional greenhouse, glass allows high-frequency radiant energy (i.e., visible light) to pass in. It is not as transparent to low-frequency infrared wavelengths of radiant energy that are trying to get out, and traps that radiation.
The Earth's atmosphere similarly acts as a one-way valve.
Work Step by Step
This is discussed on pages 312-313.