The impact of an asteroid on the Moon can release a tremendous amount of energy, often equivalent to or even greater than that of a nuclear bomb. The energy released in such an event depends on various factors, including the size, velocity, and composition of the impacting asteroid.
Nuclear bombs are typically measured in terms of their explosive yield, which is the amount of energy released by the detonation. The yield is commonly expressed in kilotons (kt) or megatons (Mt) of TNT (trinitrotoluene) equivalent. For example, the atomic bomb dropped on Hiroshima in 1945 had an estimated yield of around 15 kilotons.
When an asteroid impacts the Moon, the energy released can vary significantly depending on its size and velocity. Small asteroids, a few meters in diameter, may release energy comparable to a small nuclear bomb, in the range of a few kilotons. Larger asteroids, on the other hand, can release significantly greater energy.
To give you an idea of scale, the impact of the Shoemaker-Levy 9 comet fragments on Jupiter in 1994, which were estimated to be around 10 to 30 meters in diameter, released energy equivalent to several million megatons of TNT. The largest nuclear bomb ever detonated, the Soviet Union's Tsar Bomba, had a yield of around 50 megatons.
In summary, while the energy released by an asteroid impact on the Moon can vary depending on its characteristics, it can often be comparable to or exceed the energy released by a nuclear bomb.