(a) Colour of Sky: As sunlight travels through the earth’s atmosphere, gets scattered by the large number of molecules present. This scattering of sunlight is responsible for the colour of the sky, during sunrise and sunset etc. The light of shorter wavelength is scattered much more than light of larger wavelength. Scattering ∝ 1/λ4. This scattering is known as Rayleigh scattering. Most of blue light is scattered, hence the bluish colour of the sky predominates.
At sunset or sunrise, sun’s rays must pass through a larger atmospheric distance (Fig. (a)). More of the blue colour is scattered away. Only red colour which is least scattered appears to come from sun. Hence it appears red.

(b) Formation of Rainbow: The rainbow is a classic example of the dispersion of sunlight by the water drops in the atmosphere. This is a combined phenomenon of the refraction of sunlight by the spherical water droplets behaving in a prism-like manner. Fig. shows how the sunlight is broken into its segments in the process and a rainbow appears. The dispersion of the violet and the red rays after internal reflection in the drop is shown in the Fig. (b).

The red rays emerge from the drops of water at one angle (43°) and the violet rays emerge at another angle (41°). The large number of water drops in the sky especially just after it has rained makes for a prominent rainbow. The parallel beam of sunlight getting dispersed at these angles produces a cone of rays at the observer as seen in the figure. The rainbow, therefore, appears semicircular for an observer on earth. A secondary rainbow will sometimes be formed, with inverted colours. Here the light is reflected twice within the drop as shown in the figure. The secondary rainbow is fainter than the primary rainbow.