In 1959 the United States had a secret plan to explode a nuclear weapon either on or near the surface of the moon. The plan was known as Project A119 and the hope was that a nuclear explosion on the moon would kick up a cloud of dust visible from the Earth, and would act as a demonstration of American power and technology. The project was shelved (obviously) and classified for years, and the only reason we know about it now is because Carl Sagan, who was involved with A119, let slip the existence of the plan to nuke the moon on a job application.
While it might sound absurd, the idea of a nuclear demonstration to awe the world was a common idea among scientists in the waning days of WWII and the early days of the Cold War. There were multiple proposals for detonations on desert islands or other, similar uninhabited areas to show off the power of nuclear weapons and, hopefully, impress America’s enemies into submission.
And, it wasn’t just the US. There were also rumors that the Soviets, too, wanted to bomb the moon.