Long before NASA dropped the LCROSS probe into the Cabeus Crater, thus creating an explosion that confirmed the presence of water ice on the moon, the United States military had a plan to create a far greater explosion on the lunar surface.
According to Today I Found Out, the U.S. Air Force contemplated firing an ICBM with a thermonuclear warhead at the lunar surface as part of Project A119 in the late 1950s. The nuclear strike would have created an explosion that would have been visible from Earth.
The UK Guardian provides more details about the project in a 2000 article. The project to nuke the moon was led by Dr. Leonard Reiffel, a physicist then working for the Pentagon backed Armour Research Foundation. Also involved in the project was a young Carl Sagan, who was hired to create a mathematical model for the effects of a nuclear explosion in one sixth gravity.
The purpose of creating a nuclear explosion on the moon was not entirely clear. One possible explanation is that it was meant to be a morale booster for Americans, who then perceived that the United States was behind in the space race, with the recent launch of the Soviet Sputnik. Measuring the effects of a nuclear explosion on the moon might have had some useful scientific purpose. Sagan, reflecting the belief at the time that the moon might have microbial life, suggested that a nuclear explosion might help reveal such life in some fashion.
The idea of the first Earth contact with the moon being a weapon capable of destroying entire cities had a symbolic flavor that no doubt would have been unsettling to many people had it taken place. While a nuclear explosion on the moon would not have affected the Earth, it would have changed the lunar topography in unexpected ways.
Project A119 never went beyond the planning stages. The idea became moot, in any case, when the United States signed the 1963 Nuclear Test Ban Treaty that, among other things, banned nuclear tests in outer space. The United States found other ways to show its technological superiority over the Soviets, including being the first to land men on the lunar surface on July 20, 1969.