In the absence of light from the sun (due to the earth revolving away from the sun on its axis) the atmosphere is clear (its blue colour during the day coming from the sun's light refracting through the atmosphreic gases). One can therefore observe directly into space. What we are seeing is the absence of light, the stars are, of course, other suns but they are too distant to appear as anything other than sparkles against a black background.