To understand why is the sky blue, you first have to understand why is the light white. It is white because it consists of multiple colours which when put together, appear white. These colours range from red to blue, with orange, yellow, green and their combinations in between. Then, you should also know that the light is just one type of electromagnetic radiation, a portion visible to humans. Electromagnetic radiation comes in a range of energies which we call electromagnetic spectrum and it travels in waves. Different parts of this spectrum have different wavelengths and inside the visible light, different colours have different wavelengths.
Colour blue has the shortest distance between two crests of the wave while the colour red has the longest distance. Because of this, blue part of the light's spectrum has a better chance of hitting molecules in the atmosphere on its way from the Sun to the surface of Earth and our eyes. When it does, it disperses, making the sky blue and the Sun itself yellow-ish. This is called Rayleigh scattering. When directly above us, the Sun is nearly white and the sky is darker blue above us because very little light is scattered to colour the sky. Looking toward the horizon, the sky is bluer and lighter. This is because it is more scattered the more air it has to travel through.
When the Sun is on the horizon, however, the light has to pass through even more molecules of air to reach us, making it more likely for other parts of the light to get dispersed, resulting in the yellow sky and the red Sun. This dispersion of light when the Sun is on the horizon also makes the Sun appear larger.
So, there you go. It is pretty straightforward, but it is important to know that different colours have different wavelengths. This determines why the sky is blue and not red when the Sun is directly above us. To find more about the light and electromagnetic radiation, click here.