By Rayleigh Scattering Law : The amount of scattering is inversely proportional to the fourth power of its wavelength . Due to the larger amount of N2 and O2 molecules (78% and 21%) in the atmosphere blue light which is having shorter wavelength is scattered to a greater extent .
   Thus , the earth wouldn't be blue if it doesn't have enough O2 and N2 molecules in the atmosphere . The scattering depends on the characteristics of gaseous molecules in atmosphere.