Courtesy of http://www.eoearth.org/article/Solar_radiation:
Solar energy is created at the core of the sun when hydrogen atoms are fused into helium by nuclear fusion (Figure 2). The core occupies an area from the sun’s center to about a quarter of the star’s radius. At the core, gravity pulls all of the mass of the sun inward and creates intense pressure. This pressure is high enough to force the fusion of atomic masses.
For each second of the solar nuclear fusion process, 700 million tons of hydrogen is converted into the heavier atom helium. Since its formation 4.5 billion years ago, the sun has used up about half of the hydrogen found in its core. The solar nuclear process also creates immense heat that causes atoms to discharge photons. Temperatures at the core are about 15 million degrees Kelvin (15 million degrees C or 27 million degrees F). Each photon that is created travels about one micrometer before being absorbed by an adjacent gas molecule. This absorption then causes the heating of the neighboring atom and it re-emits another photon that again travels a short distance before being absorbed by another atom. This process then repeats itself many times over before the photon can finally be emitted to outer space at the sun’s surface. The last 20% of the journey to the surface the energy is transported more by convection than by radiation. It takes a photon approximately 100,000 years or about 1025 absorptions and re-emissions to make the journey from the core to the sun’s surface. The trip from the sun’s surface to the Earth takes about 8 minutes.
Figure 2: Major parts of the sun. Solar energy is produced at the core of the sun by nuclear fusion. This energy is then radiated to the convection zone, where mixing transfers the energy to the photosphere. The photosphere is the surface that emits solar radiation to space. On the photosphere, localized cool areas called sunspots occur. Erupting from the photosphere, are solar flares composed of gas, electrons, and radiation. The corona is the upper portion of the sun’s atmosphere. (Source of original image: SOHO
The radiative surface of the sun, or photosphere, has an average temperature of about 5,800 Kelvins. Most of the electromagnetic radiation emitted from the sun's surface lies in the visible band centered at 500 nm (1 nm = 10-9 meters), although the sun also emits significant energy in the ultraviolet and infrared bands, and small amounts of energy in the radio, microwave, X-ray and gamma ray bands. The total quantity of energy emitted from the sun's surface is approximately 63,000,000 Watts per square meter (W/m2 or Wm-2).
The energy emitted by the sun passes through space until it is intercepted by planets, other celestial objects, or interstellar gas and dust. The intensity of solar radiation striking these objects is determined by a physical law known as the Inverse Square Law. This law merely states that the intensity of the radiation emitted from the sun varies with the squared distance from the source.