Using the Zeeman Effect, astronomers can measure the strength of the magnetic fields which gives evidence that sunspots are caused by strong magnetic fields. When an atom is in a magnetic field its electron orbits are altered, the spectral lines are split when the atom is able to absorb different wavelength photons, the strength of the magnetic field is proportional to the separation between the components of the spectrum.
More evidence is provided by the fact that heat flows from hot regions to cool regions, not from cold to hot. Since the photosphere is actually cooler then the upper chromosphere and corona, energy flows out from the photosphere to the corona by the magnetic fields transferring energy, which was observed by the Solar and Hemispheric Observatory.
The upper layers of the sun also don’t have the temperatures and pressures needed to produce nuclear fusion, the temperature at the core of the sun is approximately 16 million K where the photosphere is 5800 K to 1 million at the corona. Also for nuclear fusion to occur the collisions between nuclei need to be violent and these collisions require temperatures above 4 million K. Also the densities at the core of the sun ensure that there is enough reactions per second to sustain fusion, whereas at the surface of the sun the densities are not high enough for nuclear fusion to start.