There is a direct relationship between the temperature of a blackbody and the amount of electromagnetic energy it emits. The hotter the object, the more energy it gives off. For instance, consider this diagram which overlays the theoretical curve created by a perfect blackbody and the actual curve created by the Sun. The hotter an object is, the more electromagnetic energy it emits. Just as the total amount of energy emitted by an object depends on its temperature, the wavelength at which the largest portion of energy is emitted depends on temperature.
Hotter objects emit more energy at lower wavelengths than do cooler objects.
Think about this relationship. Notice how, on the diagram, the peak of the 300 K line is at about 9 micrometers. Indeed, the earth continually emits radiation at 9.7 micrometers. Now look again at the figure in which the solar radiation curve and 6000 K blackbody curve are superimposed. Plank's Radiation Law for Blackbodies gives the spectral radiance of an object as a function of its temperature.