Firstly, the moon is not a light source. So it cannot produce its own light. It shines just because of the sun. Actually, at daytime the sun heats the moon and some amount of light is radiated by the moon in daytime. But such radiation is of very low intensity in comparison to light radiated by the sun, so our eyes fail to see the moon shine in daytime.
At night too, the moon radiates the light because of the absorbed extra heat from the sun. But in night, the sun is not there. So, we become able to notice the moon shine. But in reality, it is the only truth that the moon has no capacity to produce light on its own. But yes, it shines even then in night because it radiates light only because of heat absorbed from sunlight. Without having the sun in the universe, we cannot see the shining moon in night too.