The Sun, a main sequence star, is at a stage of its life during which it is fueled by thermonuclear fusion.
In this process, hydrogen converts to helium, creating massive amounts of energy.
Just as with all the stars we see shining in the sky, some of this energy radiates as visible light, rays of sunlight.
The color of the Sun is white, although from the surface of the Earth it may appear yellow because of atmospheric scattering.
The Sun is informally designated a yellow star, because most of its radiation is in the yellow-green portion of the visible spectrum.