Where there is no light then there is darkness. This means that a surrounding without light would be black in color. Our experience here on Earth (one common example, night and day) tells us that the color black (or darkness) indicates the absence of light. However, space (or outer space) contains countless of bright shining stars including our Sun. Our Sun is not even the largest or brightest star in the universe, very far from it. Space as we can see, including our solar system, is surrounded with light. In spite of this however,space still remains (looks) pitch black.
On Earth however, we have what is called daylight. Daylight is the time after sunrise and before sunset and is the condition of brightness created by the rays of the sun. This brightness is a combination of all direct and indirect sunlight. Daylightproduces a visual sensation that allows us to see our entire surrounding (environment) in its form and colors, such as, the beautiful blue sky, puffy white clouds, flowers of all variety and colors, as well as, all the other beautiful objects surrounding us in our day to day life in our environment.
The earth is surrounded by a gaseous envelope called the atmosphere. Apart from the layer of gases , the atmosphere also contains moisture (water droplets) and dust particles. The light from the sun hitting these “obstacles” in the atmosphere (air) causes light to reflect and refract. The reflected (bouncing off) and the refracted (deflected when the light go through a substance) rays illuminates our surroundings allowing one the power to perceive by sight (see) the world in its splendid colors.
Space on the other hand, is black in spite of the numerous star presence. Space contains comic dust and elements like hydrogen and helium atoms for every cubic meter (or per cubic centimeter). This however means that its gas molecules density is so low that it is practically nonexistent- a vacuum. This means that all the light in space will travel in a straight line without any dispersion (refraction and reflection). This is similar to a laser pointer where you see the spot but not the beam. This is due to the fact that the light does not go to where your eye is, it is not dispersed. The light goes directly to the spot where the pointer is pointing. Therefore, you can only see spots of lights in space from its source but not the illumination of its surroundings. Light makes its way to our eyes because you are looking at something bright but the light itself is not scattered. Space has no atmosphere (almost a perfect vacuum) which means there is nothing for the light to become “scattered” on. As such, there are no colors for you to see and therefore outer space always looks black.