More specifically, both the peak frequency and the range of frequencies emitted by an object depends on how hot it is. In fact, the EM radiation emitted by the Earth does not include visible light. The sun radiates energy in the form of EM radiation. Some of this radiation is intercepted by the Earth. For the range of frequencies depicted in the graph, most of the power in solar radiation is to be found in the visible spectrum.
Red light is less affected by absorption within the atmosphere.
This is why plants are green. They absorb selectively, reds and blues and reflect green-colored light. They actually use the red and infrared colored light to drive photosynthesis. Remember, again, how all this works. Our atmosphere comprises atomic and molecular gases.