At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
Because it's incandescent light (from heating matter till it glows), we get full-spectrum light but due to the temperature the yellow light is the brightest. The light spectrum goes according to the Maxwell-Boltzmann distribution.
Actually, the sun sends out mostly blue light, even though all frequencies are present at different degrees. But, since most of the blue is absorbed by the oxygen molecules in the atmosphere, the remaining light that reaches earth looks yellow.
I'm not sure where the idea of mostly blue come from... With an effective temperature of about 5778 K, the peak wavelength of emitted light is around 502 nm which is yellow-green... some calculations say slightly more blue than that. The astronauts have reported the sun appearing greenish to them from space. Its yellowish to us perhaps somewhat due to Rayleigh scattering, perhaps to a combination of scattering and because of physiology of human sight
The sun actually emits radiation , ie light, in all wavelengths. It, like all stars, follow a blackbody radiation curve. The curve for the sun peaks a temperature of 5777K, which can be converted to wavelengths and results in a 503-502 nm wavlength. Depending on the model which you it can vary a little but it is mostly considered to emit in the yellow to green side of the visible spectrum. The reason why when you look at a spectrum of the sun you see all the wavelength is because the sun actually emits all wavelengths rather than just yellow.