Solar Fusion and Solar Constant
The energy from the Sun - both heat and light energy - originates from a nuclear fusion process that is occurring inside the core of the Sun. The specific type of fusion that occurs inside of the Sun is known as proton-proton fusion.
Inside the Sun, this process begins with protons (which is simply a lone hydrogen nucleus) and through a series of steps, these protons fuse together and are turned into helium. This fusion process occurs inside the core of the Sun, and the transformation results in a release of energy that keeps the sun hot. The resulting energy is radiated out from the core of the Sun and moves across the solar system. It is important to note that the core is the only part of the Sun that produces any significant amount of heat through fusion (it contributes about 99%). The rest of the Sun is heated by energy transferred outward from the core.
Figure 1.

Eventually, the fuel of the sun - hydrogen - will run out. When this happens, the sun will begin to die. But don’t worry, this should not happen for about 5 billion years.
After the hydrogen runs out, there will be a period of 2-3 billion years whereby the sun will go through the phases of star death. Once the hydrogen runs out, our yellow dwarf star will begin to swell. It will swell to a size that will cause it to swallow Mercury, Venus, and Earth. It may even grow to overtake more of the planets. When the sun increases in size it will become a “red giant.” After this, it will lose many of its outer layers and eventually shrink to become a “white dwarf.” White dwarf stars are still very hot, but not nearly as hot as the sun is now. Finally, our star will fade out and become a “black dwarf,” where very little is left of its original form. Black dwarf stars are not hot and don’t put off any energy.
Nuclear Fusion and the Sun
The Sun’s nuclear fusion reaction is the key to all life in our solar system. In the core of the Sun, hydrogen atoms are forced together under enormous pressures. This causes the hydrogen atoms to fuse and become helium atoms, creating a chain reaction that emits incredible amounts of energy.
Every time 1 gram of hydrogen is converted into helium, the reaction releases enough energy to power a 15-watt light bulb for more than 100 years! To put it into perspective, the Sun fuses about 620 million tonnes of hydrogen every second.
Just How Powerful is the Sun?
So the Sun is pretty powerful, but just how much energy are we talking about? Well, the Sun produces about $3.8 \times 10^2$ joules of energy every second. By comparison, the entire Earth uses about $5.8 \times 10^2$ joules of energy every year.
This means that every single second, the Sun is producing about 650,000 times as much energy as the Earth consumes in an entire year!
And all that energy gets put to good use, especially on Earth. Without the Sun’s power, the Earth would live in total darkness. There would be no wind, no rain, the plants wouldn’t grow and the planet would freeze until it was incapable of sustaining life.
The Solar Constant
The luminosity of the Sun is about $3.86 \times 10^{26}$ watts. This is the total power radiated out into space by the Sun. Most of this radiation is in the visible and infrared part of the electromagnetic spectrum, with less than 1% emitted in the radio, UV and X-ray spectral bands. The Sun's energy is radiated uniformly in all directions.
Because the Sun is about 150 million kilometres from the Earth, and because the Earth is about 6300 km in radius, only $0.000000045\%$ of this power is intercepted by our planet. This still amounts to a massive $1.75 \times 10^{17}$ watts. For the purposes of solar energy capture, we normally talk about the amount of power in sunlight passing through a single square metre face-on to the Sun, at the Earth's distance from the Sun. The power of the Sun at the Earth, per square metre is called the solar constant and is approximately 1370 watts per square metre (W/m$^2$).
The solar constant actually varies by +/-3% because of the Earth's slightly elliptical orbit around the Sun. The Sun-Earth distance is smaller when the Earth is at perihelion (first week in January) and larger when the Earth is at aphelion (first week in July). Some people, when talking about the solar constant, correct for this distance variation, and refer to the solar constant as the power per unit area received at the average Earth-Sun distance of one Astronomical Unit (AU) which is 149.59787066 million kilometres.
There is also another small variation in the solar constant which is due to a variation in the total luminosity of the Sun itself. This variation has been measured by radiometers aboard several satellites since the late 1970's. Figure 1 is a composite graph produced by the World Radiation Centre in Switzerland and shows that our Sun is actually a (slightly) variable star.
Figure 2.

The variation in the solar constant has been about 0.1% over a period of about 30 years. Some researchers have tried to reconstruct this variation, by correlating it to sunspot numbers, back over the last 400 years, and have suggested that the Sun may have varied in its power output by up to one percent. It has also been suggested that this variation might explain some terrestrial temperature variations. It is interesting to note that the average G-type star (the class of star the Sun falls into) typically shows a much larger variation of about 4%.