The blue color of the sky is primarily caused by the scattering of sunlight by the Earth's atmosphere. This phenomenon is known as Rayleigh scattering, where shorter wavelengths of light, like blue, are scattered more than longer wavelengths like red. As sunlight passes through the atmosphere, the light is scattered in different directions by air molecules and particles, and the blue light is scattered more because it has a shorter wavelength.
Thus, the correct answer is option (4) Scattering of light.