The sun is a huge sphere of glowing gases that produce energy and light, which make life on Earth possible. The temperature of the sun varies tremendously, and not in ways you might realize.
At the core of the sun, gravitational attraction produces immense pressure and temperature, which can reach more than 27 million degrees F (15 million degrees C). Hydrogen atoms get compressed and fuse together, creating helium. This process is called nuclear fusion.
Nuclear fusion produces huge amounts of energy. The energy radiates outward to the sun's surface, atmosphere and beyond. From the core, energy moves to the radiative zone, where it bounces around for up to 1 million years before moving up to the convective zone, the upper layer of the sun's interior. The temperature here drops below 3.5 million degrees F (2 million degrees C). Large bubbles of hot plasma form a soup of ionized atoms and move upwards to the photosphere.
The temperature in the photosphere is about 10,000 degrees F (5,500 degrees C). It is here that the sun's radiation is detected as sunlight. Sunspots on the photosphere are cooler and darker than the surrounding area. At the center of big sunspots the temperature can be as low as 7,300 degrees F (4,000 degrees C).
The chromosphere, the next layer of the sun's atmosphere is a bit cooler — about 7,800 degrees F (4,320 degrees C). Visible light from the chromosphere is usually too weak to be seen against the brighter photosphere, but during total solar eclipses, when the moon covers the photosphere, the chromosphere can be seen as a red rim around the sun.
Temperatures rise dramatically in the corona, which can also only be seen during an eclipse as plasma streams outward like points on a crown. The corona can get about 3.5 million degrees F (2 million degrees C). As the corona cools, losing heat and radiation, matter is blown off as the solar wind.
The sun is the largest and most massive object in the solar system. It is about 93 million miles from Earth. The sun's light and heat takes about eight minutes to reach us, which leads to another way to state the distance to the sun: 8 light-minutes.
— Tim Sharp, Reference Editor