About 6% of the sunlight striking the earth leaves the atmosphere as visible light. The air is mostly transparent, so most of the light from the sun that reaches earth is scattered to space. Most of the light (that would be visible) heading toward Earth is absorbed by the atmosphere, which causes it to scatter. The scattered light can be refracted (bent) through the atmosphere, creating an image of the sky. On a cloudless day, we see blue–white sunlight reflected back to us, giving the sky its color. The rest of the sunlight is converted to infrared radiation (heat) or ultraviolet radiation (light) before it reaches the earth’s surface.
The atmosphere also helps regulate the temperature of the earth’s surface. The atmosphere absorbs the sun’s energy and releases it to the surface of the earth. As the earth’s surface heats up, it gives off long-wave radiation and warms the atmosphere, too.