Whether the Moon is there or not does not depend on the Sun at all. However, the Moon light, that is a different story. The Moon shines only because the surface of the Moon reflects light from the Sun. Sometimes it shines brightly, but the fact is that it only reflects 3-12% of the sunlight that hits it.
Step-by-step explanation:
The existence of the moon doesn't depend on the sun however moonlight depends on the sun as sunlight conflict on the moon and speculated the earth. The sun bounces light off the moon so we can see at night.