The sun produces heat and electromagnetic radiation as a product of the fusion of hydrogen nuclei into helium nuclei. The radiation produced covers most of the electromagnetic spectrum, including visible, ultraviolet and infrared light, as well as X-rays and radio waves.
The heat from the sun allows the earth to remain at a life-sustaining temperature. In addition, the light from the sun allows photosynthesis to occur, which is the direct and indirect source of nearly all of the food on the planet. Even fossil fuels, such as oil, coal and natural gas, are the indirect result of the sun's energy, since they are derived from the fossilized remains of plants and animals that would not have existed without photosynthesis.