The sky appears blue to the human eye as the short waves of blue light are scattered more than the other colours in the spectrum, making the blue light more visible.
To understand why the sky is blue, we first need to understand a little bit about light. Although light from the Sun looks white, it is really made up of a spectrum of many different colours, as we can see when they are spread out in a rainbow.
We can think of light as being a wave of energy, and different colours all have a different wavelength. At one end of the spectrum is red light which has the longest wavelength and at the other is blue and violet lights which have a much shorter wavelength.
When the Sun's light reaches the Earth's atmosphere it is scattered, or deflected, by the tiny molecules of gas (mostly nitrogen and oxygen) in the air. Because these molecules are much smaller than the wavelength of visible light, the amount of scattering depends on the wavelength. This effect is called Rayleigh scattering, named after Lord Rayleigh who first discovered it.
Shorter wavelengths (violet and blue) are scattered the most strongly, so more of the blue light is scattered towards our eyes than the other colours. You might wonder why the sky doesn't actually look purple since the violet light is scattered even more strongly than blue. This is because there isn't as much violet in sunlight to start with, and our eyes are much more sensitive to blue.
The blue light that gives the sky its colour, is sufficiently bright to make all the stars that we see at night disappear since the light they emit is much dimmer.