It does seem plausible that we could in fact harm ourselves by attempting to launch a nuclear device out of Earth's orbit. We do have a record of failed launches, several of them recent. Once the nuclear device is out of orbit however, I agree that the harm it can do to us is negligible.
Edit: Also, it just occurred to me the possibility of deflecting a comet (which was never in our path) into our path, instead of away from it, which is really great material for a Hollywood comedy.
Good point, but the chances of a failed launch are fairly small, and the damage from accidentally detonating a large nuke on the Earth's surface, while bad, would be small compared to human extinction.
If we are sufficiently uncertain about the comet's path, we might accidentally deflect it towards us. Obviously, if this is just as likely as deflecting it away from us, it would not be worthwhile to try. But most likely we would be able to reduce the probability of a catastrophic impact even after taking into account the possibility of such an error.
"The non-nuclear explosives in two of the weapons detonated upon impact with the ground, resulting in the contamination of a 2-square-kilometer (490-acre) (0.78 square mile) area by plutonium. [... another which fell] into the Mediterranean Sea, was recovered intact"
Edit: Also, it just occurred to me the possibility of deflecting a comet (which was never in our path) into our path, instead of away from it, which is really great material for a Hollywood comedy.