Hello There!
The moon is illuminated because it reflects light from the sun. The brightness from the moon depends on where the moon is in its orbit around the planet.