First, they’re not designed to hit the moon. So it’d miss, and/or not have enough energy to get there, and/or malfunction in outer space.
Second, even if you designed one to be able to make it there, “nukes” have such a big effect on Earth largely because of the atmosphere, which is not there on the moon. So you’d have an explosion and release some radioactivity, but it would just make a relative small crater, which the moon has many many of, not to mention much bigger ones.
Third, even if you had the same explosive effect as on the Earth, no, the moon is a substantial fraction of the size of the Earth, and a city or nuclear explosion is not. Not even close. So, “no big whoop”.
There are some web sites… er, and earlier threads on Fluther, discussing what it takes to destroy a planet, and what would happen to the Earth if the moon vanished, etc.