White light contains all the colors of the rainbow. All the colors in white light have different wavelengths. Red light has the longest wavelength. Red light's wavelength is larger than oxygen atoms are big. When red light passed through the atmosphere, its long wavelength causes it to pass through the atmosphere without being scattered.
Blue light has a much, much shorter wavelength than red light.
The wavelength of blue light is shorther than oxygen atoms are big. Many of the blue light waves from the sun collide with the oxygen atoms. When such blue light waves try to go straight through an oxygen atom, its light is scattered in all directions because of this collision. This scattered blue light is what makes the sky blue. Blue light's short wavelength causes it to be scattered the most.