The reason why the sky is blue is due to molecules in the air. Firstly we need to know that white sunlight is made up of lots of different colours. When the blue light of sunlight passes through the sky it bounces off partials like oxygen and atoms which are floating in the air. Some colours of light travel through the air better than others, so because violet and blue colours have the shortest wavelengths they get bounced around the most making the sky blue/violet. When we look into the sky our eyes only see blue and not violet. This is purely because our eyes are more sensitive to blue light than violet, so that is why we perceive the sky as blue.