Absorption of Light
The atmosphere absorbs almost all of the x-rays and gamma rays coming from space, as well as most of the ultraviolet light. It absorbs some of the infrared light as well - but this works both ways: it absorbs some of the IR from space coming to the earth but it also absorbs some of the IR coming from the earth and decreases the earth’s ability to cool off. This last effect is called the greenhouse effect.