Space has no atmosphere. Hence, light rays from the sun are not scattered in the atmosphere. Due to this, the sky appears dark to an astronaut.