Any object having a temperature greater than absolute zero gives off electromagnetic radiation. Water in the atmosphere primarily known as water vapor upon encountered by the heat released by the sun emits relatively long wavelengths of infrared photons. These infrared photons moved up to the more elevated level in the atmosphere since it is now highly reactive.