First, we need to calculate the absolute brightness of a nuclear fireball. This chart claims to show how the temperature and diameter of a small nuclear fireball (20 kt) varies over time. The light output will be greatest when the fireball is biggest and hottest. Let's focus on t = 0.1 seconds, when the fireball peaks at a temperature off 8000 Kelvin, and its diameter is 400 m.
The light power output of one square meter of surface is given by the Stefan-Bolzmann blackbody law. Multiply that by the surface area of the sphere to get the total light power output. I get 1 x 1014 watts. (Sanity check: a 20 kt weapon releases roughly 1014 Joules of energy; if a good fraction of that is released as light in a good fraction of a second, 1014 watts is reasonable.)
This light travels outward in all directions. By the time it reaches the Moon, it's spread out roughly evenly over the area of a sphere whose radius is the earth-moon distance. The nuke's brightness (radiant power density), in watts per square meter at the Moon's distance, is therefore about 5.39 x 10-5 W/m2
In comparison, the Sun's radiant power density at the Earth is 1368 W/m2. -- from the Moon, the nuke appears 25 million times less bright than the Sun does from Earth.
Astronomical objects (planets and stars) are compared on a magnitude scale, where brighter things have a smaller magnitude number. A dim star visible to the eye is magnitude 4 or 5, a typical bright star is magnitude zero, the bright planet Venus is -5, the full Moon seen from Earth is -12.6, and the Sun is -26.7. The scale goes up by 5 units for every factor of 100 in brightness. 25 million is 3.7 factors of 100, so the nuke seen from the Moon will have a visual magnitude of -26.7 + 5 * 3.7 = -8.
Thus, seen from the Moon the nuke will be somewhere between the brightness of Venus and the full Moon as seen from Earth. Really really damn bright. (If you've ever seen an Iridium flare, it's like that.) If it happened on the night side of the Earth, it would be clearly visible against the dark background.
However, the fully-lit Earth seen from the Moon is much brighter than the full Moon seen from Earth, because the Earth is both bigger and more reflective: I estimate it'd be about magnitude -16. It might be hard to notice a magnitude -8 "star" against the bright background of the sunlit Earth, but that's more about human visual perception than physics, so I can't really give a definite answer.Source