The following explanation is from

Why not violet?

If shorter wavelengths are scattered most strongly, then there is a puzzle as to why the sky does not appear violet, the colour with the shortest visible wavelength.  The spectrum of light emission from the sun is not constant at all wavelengths, and additionally is absorbed by the high atmosphere, so there is less violet in the light.  Our eyes are also less sensitive to violet.  That's part of the answer; yet a rainbow shows that there remains a significant amount of visible light coloured indigo and violet beyond the blue.  The rest of the answer to this puzzle lies in the way our vision works.  We have three types of colour receptors, or cones, in our retina.  They are called red, blue and green because they respond most strongly to light at those wavelengths.  As they are stimulated in different proportions, our visual system constructs the colours we see.

Response curves for the three types of cone in the human eye

When we look up at the sky, the red cones respond to the small amount of scattered red light, but also less strongly to orange and yellow wavelengths.  The green cones respond to yellow and the more strongly scattered green and green-blue wavelengths.  The blue cones are stimulated by colours near blue wavelengths, which are very strongly scattered.  If there were no indigo and violet in the spectrum, the sky would appear blue with a slight green tinge.  However, the most strongly scattered indigo and violet wavelengths stimulate the red cones slightly as well as the blue, which is why these colours appear blue with an added red tinge.  The net effect is that the red and green cones are stimulated about equally by the light from the sky, while the blue is stimulated more strongly.  This combination accounts for the pale sky blue colour.  It may not be a coincidence that our vision is adjusted to see the sky as a pure hue.  We have evolved to fit in with our environment; and the ability to separate natural colours most clearly is probably a survival advantage.