Dear Student,
Scattering is the phenomenon by which a beam of light is redirected in many different directions when it interacts with a particle of matter. When sunlight strikes molecules in our atmosphere, the light is redirected in many directions. The blue light is scattered more than the red light causing the sky to be blue.
In the space, there is no atmosphere. So, light will not scatter in space. This is the cause of dark sky when viewed from space.
Regards,