Phil Plait explains why nuking Mars is a bad idea.

The internet’s “Bad Astronomer” takes to to explain to Elon Musk and everybody else why detonating nuclear bombs on the Martian ice caps would really not be terribly productive:

The current pressure on Mars is 6 millibars, which is about 15 grams of CO2 per square centimeter. To get to 1 bar — the needed pressure to sustain water on the surface — you’d need about 2,500 grams per square centimeter (higher than Earth due to the lower gravity of Mars). Obviously, it’ll take a lot of CO2, over 150 times what’s there now.

And there’s the problem. There isn’t all that much frozen CO2 in the Martian polar caps. The research authors find that if you thaw both caps completely you’ll only add about 9 millibars of pressure to the air there, which is still only 15 millibars. That’s a far cry from the 1,000 millibars needed! Mind you, the layers of dry ice on the caps are thin, just a few meters thick at most, and in the relative summer most of it sublimates (turns into a gas) anyway. Obviously, that’s not really helping, so thawing out both caps at the same time is still just a drop in the bucket.

Nuking the caps, as Musk suggests, won’t really help. The ice caps are hundreds of kilometers across, and it would take huge numbers of detonated weapons to liberate all that CO2 (remembering that thawing the water won’t help; it’ll just refreeze). There’s also the issue of lingering radiation, which would make the poles and probably much more of Mars uninhabitable for centuries.

Smashing comets into the poles is a far better idea, since there’s no radiation, and they’re commonly made up of substantial amounts of frozen water and CO2. Asteroids, too. This might take longer, since moving them around isn’t easy, but there are many ideas on how to do that… and as an added bonus, it would give SpaceX a lot of knowledge on how to move potentially dangerous rocks headed toward Earth.

However, like nukes, it would take a huge number to thaw the polar caps. It also might put a lot of dust into the atmosphere that would cool the planet, not warm it. The sheer number of impacts you’d need to implement this would drastically change the surface of Mars, too.

Plenty more at the link, if you want to dive deeper into the conversation.