Blue colour of the sky is on account of scattering of light of shorter wavelength by particles in the atmosphere of earth. If the earth had no atmosphere, there would not have been any scattering and sky would have looked dark. When astronaut in his spacecraft goes above the atmosphere of earth, sky appears dark to him because there is no scattering of light.