Moonlight restores the user's current HP based on the weather conditions and time of day. In morning and day, clear conditions restore ¼, sunny conditions restore ½ and other conditions restore 1/8 HP. At night, the move restores twice as much of HP. In link battle, move restores HP as if it was night.
Generations III to V
Moonlight restores the user's current HP based on the weather conditions in the battle. Normal conditions restore ½ total HP, sunny conditions restore ⅔ total HP, and other weather conditions restore ¼ total HP.
Unlike Morning Sun, Espeon's signature move in Generation II, Moonlight was not learnable only by Umbreon. However, because of Espeon's association with that move, Moonlight can still be considered Umbreon's equivalent move as they occupy similar positions in each Pokémon's moveset.
Despite the name's association with the night, Moonlight actually restores more HP in sunny conditions (which can be considered an opposite with nighttime). This could be a reference to the fact that moonlight is in fact just sunlight that's been reflected by the Moon.