The output of light and heat of the Sun requires that some 600 million tons of hydrogen be converted into helium in the Sun every second. This the Sun has been doing for several thousands of millions of year.
The nuclear energy is released at the Sun’s center as high-energy gamma radiation, a form of electromagnetic radiation like light and radio waves, only of very much shorter wavelength. This gamma radiation is absorbed by atoms inside the Sun to be reemitted at slightly longer wavelengths.
This radiation, in its turn is absorbed and reemitted. As the energy filters through the layers of the solar interior, it passes through the X-ray part of the spectrum eventually becoming light. At this stage, it has reached what we call the solar surface, and can escape into space without being absorbed further by solar atoms. A very small fraction of the Sun’s light and heat is emitted in such directions that after passing unhindered through interplanetary space, it hits the Earth.