We on earth see the space black only at night. But on moon it observed that the space is black in both day and night even though the source is same for both ( the sun).Why? And also there are many other stars in this universe which make the background bright, but why the space still black?
The reason the sky is blue on Earth is because of the Earth's atmosphere. The molecules and gas in the atmosphere interact with solar light via Rayleigh scattering, which allows for blue light to be scattered more efficiently than lower frequencies. This results in an abundance of blue light, which makes the sky look blue. Actually it should be said that violet is the best scattered frequency in the visible spectrum, but we see blue because of the receptors in the human eye. See here.
There is no atmosphere on the Moon, so no scattered light and no colour blue.
But why is the sky black?
1) Our eyes are only sensitive to a narrow region of the electromagnetic spectrum. If we could see X-rays and radio waves, it would certainly be much brighter.
2) Many stars in the universe are so far away that their light has not had the time to reach us yet.
3) Stars recede due to the expansion of the universe. As they do so, their emitted light goes down in frequency (gravitational redshift): at some point, their emitted light will not fall within the visible spectrum and we won't be able to see it anymore.
The space appearing black despite the abundance of stars is Olbers' paradox.
Poet Edgar Allan Poe suggested that the finite size of the observable universe resolves the apparent paradox: because the universe is finitely old and the speed of light is finite, only finitely many stars can be observed within a given volume of space visible from Earth. The density of stars reached by any line of sight from the Earth within this finite volume is low.