I mean, take everything you've ever heard about the importance of the ozone layer, and everything you've ever heard about the importance of the magnetic shield the Earth has, add a few more little effects you may not even be thinking about like the effect the sheer bulk of atmosphere above us has on screening things, and you're getting to the baseline of what space is like. Add in the fact that sometimes space gets even worse courtesy of solar storms.
(For reference, the International Space Station is actually under the van Allen belts, so it still is substantially protected from radiation, though not entirely. Go above those and the situation gets much worse.)
If there are people or substantial infrastructure on the moon at the time, there are plenty of other good reasons not to light off nukes on the moon unrelated to the radiation. While some of the negative effects nukes have on Earth are the result of its relatively thick atmosphere, there are also ways in which the atmosphere is protective and limits the effect of nukes. Without any atmosphere, all material ejected from the nuke site does not lose any of its kinetic energy. Thus, a single surface nuke can pepper the entire surface of any airless planet with material below the escape velocity of the relevant planet. The moon's escape velocity is 2.38 km/s, or as we commonly measure bullet velocities, ~7,800ft/s. Modern high-power rifles reach ~3,900ft/s, so a single surface nuke on the moon potentially peppers the entire surface with high-powered bullets. I don't know how dense such a peppering would be without much more math, but at least some amount of material will go over the entire surface. Granted that anything built on the surface of the moon must be resilient against micrometeorites, that may still overwhelm such defenses, and anyone mobile on the surface would be in danger with little time to react (though not zero time).