Hi Cynthia,
The way we can tell the temperature of the surface and atmosphere of the Sun is by looking at the light they produce.
When things glow because they are hot, their color reveals how hot they are.
This is why stars come in different colors - they are at different temperatures.
In general red stars are coolest- their surfaces are at about 3,000 degrees C
A yellow-white star like the Sun is hotter, just under 5,600 degrees C
Very hot stars are blue. Those can be as hot as 30,000 K or so.
We can tell that the Sun's atmosphere is even hotter than that because
it produces ultraviolet light and X-rays - kinds of light that are even
more energetic than blue light.
To really study the colors of something it is good to use a kind
of instrument called a spectrograph. Spectrographs spread the light
into its different colors, like a prism does. We also use
telescopes with special filters which let us just look at certain
colors of light.
regards,
Terry