Physicist: The blue of the sky is sunlight that has been scattered by the air in a process called Rayleigh scattering. The probability that a photon of frequency is scattered is proportional to . So purple (the highest frequency we can see) gets scattered about 15 times as much as red (the lowest). The derivation of the “fourth power law” isn’t even a little bit obvious, and explains almost nothing.
So if purple is the most scattered color, then why is the sky blue? While sunlight is a combination of all colors, it isn’t an even combination of all colors. Near the top of the visible spectrum the intensity of sunlight drops approximately exponentially with increasing frequency. These two effects mean that both lower frequencies and very high frequencies won’t be seen in the color of the sky, and in between is a surprisingly sharp “sky blue”.
One of the results of the above argument is that the color of the sky is dependent only on the spectrum of the incoming light, not on the composition of the atmosphere, and as such the sky of every planet in our solar system (all those planets with transparent atmospheres at least) is the same blue. The contrast, however, is dependent on the density of the atmosphere.