Theory:

Rayleigh scattering:

Rayleigh scattering is the scattering of sunlight by the atoms or molecules of gases in the earth's atmosphere.
 
Rayleigh's scattering law:
 
Rayleigh's scattering law states that "The amount of scattering of light is inversely proportional to the fourth power of its wavelength".
 
Amountofscattering"S"1λ4
 
This law states that shorter wavelength colours scatter much more than longer-wavelength colours. The blue colour (shorter wavelength) is scattered more than the red colour when sunlight passes through the atmosphere (longer wavelength). Because of this scattering, the sky appears blue. The Sun's light rays must travel a greater distance through the atmosphere at sunrise and sunset than at noon. As a result, the majority of the blue lights scatter, leaving only the red light, which is the least scattered, to reach us. As a result, the Sun appears red at sunrise and sunset.
 
sky-g76245b62d_1920.jpg
Red sunset
 
Mie scattering:

When the diameter of the scatterer is equal to or greater than the wavelength of the incident light, Mie scattering occurs. It is an elastic scattering as well. Wavelength has no effect on the amount of scattering. Pollen, dust, smoke, water droplets, and other particles in the lower atmosphere contribute to Mie scattering. The white appearance of the clouds is due to Mie scattering. When white light falls on a water drop, all of the colours are evenly dispersed, resulting in white light.