The temperature of an object is related to the type of electromagnetic radiation it emits. Every atom in the universe is in motion. This is true whether the atom is in a star or a planet or in deep space. Temperature is just a measure of the motions of atoms. Every object emits a smooth thermal spectrum of radiation with a peak wavelength that is inversely proportional to temperature, a relationship is called Wien's law. The universe is filled with thermal radiation from objects with a wide range of temperatures.
The surfaces of most stars have temperatures of several thousand degrees Kelvin, and so they emit thermal radiation that peaks in the visible spectrum. For example, the Sun has a surface temperature of about 5500 Kelvin and the Sun's radiation peaks at 5.5 x 10-7 meters or 0.55 microns.
Wien's law can be used to predict the thermal spectra that peak at invisible wavelengths. Consider a planet at a temperature of 300 Kelvin (like the Earth). This is 300/5500 or about 1/18 the temperature of the Sun, so the peak radiation from the planet will be at a wavelength 18 times longer than the peak wavelength of sunlight. This is 18 x 0.55 = 10 microns, in the infrared part of the electromagnetic spectrum.
The blackbody spectrum of the Cosmic Microwave Background. This peaks at microwave wavelengths at a temperature of around 2.7 Kelvin. Click here for original source URL.
It turns out that the entire universe emits a thermal spectrum at the frigid temperature of 2.7 Kelvin — this peaks at microwave wavelengths. At the other extreme, hot stars like white dwarfs can have surface temperatures of 50,000 Kelvin. This is 50,000/5500 or 9 times the temperature of the Sun, so the peak radiation will be at a wavelength 9 times shorter than the peak wavelength of sunlight; 0.55/9 = 0.06 microns is in the far ultraviolet. Wien's law can be applied over an enormous range of temperature and wavelength.
Diagram of the Electromagnetic Spectrum. Click here for original source URL.
What can we learn about the universe from invisible forms of electromagnetic radiation? Plenty! Everything in space that emits visible light has a temperature of a few thousand degrees. Remember that when we see planets we are just looking at reflected sunlight, like an imperfect mirror. Any object colder than a star will emit thermal radiation in the infrared part of the spectrum. This is true of planets, and it is true of us too! We are at a temperature of several hundred Kelvin and emit infrared waves. There is even colder gas and dust between stars that emits microwaves. At the other extreme, a gas at a temperature of millions of Kelvin will emit a thermal spectrum that peaks at X-ray wavelengths. The invisible forms of electromagnetic radiation are our signposts to the very cold and very hot regions of the universe.