As for A119, the issues with the project were entirely political. The idea of bombing the moon is a good one; it's a legitimate way of collecting scientific data in lieu of being able to deploy a drilling team on the surface, and something that's been done with non-nuclear impactors. See [0], [1], [2], and probably a bunch of other cases I don't remember today.
It's easy to say that "nukes bad humans stupid", but there are aspects to this idea - and a bunch of other so-called "peaceful uses for nuclear weapons" - that illustrated human smarts, not stupidity.
--
[0] - https://en.wikipedia.org/wiki/LCROSS
Edit: thanks for the response btw
As for bombing Mars ice caps, that was a nice idea too, IMO (even though AFAIK it turned out to not be useful). The goal here was to densify the atmosphere with water vapor and COâ‚‚. Assuming you consider terraforming Mars a good idea, doing it in reasonable timescales will require some preparations involving direct applications of lots of energy - whether it's melting the ice caps, or redirecting comets to hit the planet. At some point we might be able to accelerate the process by deploying bacteria and plants (read: self-replicating chemical processing nanobots), but the conditions are not right for this yet - hence the ideas like using nukes or comets to bootstrap those conditions.
Also half the stuff that shows up on HN.
Let's not presume high moral motives in everything our forefathers did, nor to all of our current generation either.
https://en.wikipedia.org/wiki/Project_A119