Just in case you don't know this yet, light from the sun is made up of a spectrum of colors that all continuously merge into each other. The difference between the different colors, on a physical level as opposed to a perceptual one, is that different colors are light of different wavelengths and frequencies. The blue end of the spectrum has the highest frequency and the red end has the lowest frequency. That means they deflect the light so that it changes direction. However, different colors are more affected by scattering than others.
Blue light is scattered most and red light is scattered least.
Another point to remember is that we only see light because it hits our eyes. This may seem obvious but it is easy to forget when we think about the exact details of how light travels and how we observe things. We now have the basic ideas we need to combine to explain why the sky is blue. If there were no atmosphere, the sky would seem dark like in space because the only light coming into your our eyes would be that coming in a straight line from stars. But on Earth, the atmosphere is scattering light all the time.