While I was serving as the chief scientist for volcano hazards of the US Geological Survey, Mount St Helens chose that time to erupt (October 1, 2004). At the time I was also still volunteering to answer questions for Ask-a-Geologist. Perhaps because of my calling at the time, I received not one but two AAG queries that went something like this (I couldn't find them in the archives or I would quote directly):
Why can't you drop an atom bomb on <Mount St Helens> to stop it from erupting?
A variant on this suggestion is to use a nuclear device to trigger a pending eruption at a time of your choosing.
There are several problems with this approach:
A. Highly radioactive debris scattered widely over a populated area.
B. You would need to get the device under the ground to open the ground.
C. The inherent energy of most volcanoes is far larger than any nuclear devices built by man.
"A" is, I hope, obvious. Nearly as many people died of radiation poisoning after the Hiroshima uranium bomb was dropped than died of the immediate blast itself. Half-lives for things like the unstable isotopes of strontium and cesium are looooong - thousands of years - and they are poisonous the whole time they are decaying. Plutonium is, gram for gram, far more deadly than botulinum toxin.
"B" is basic physics. A small stick of dynamite will blow OPEN a standing safe by over-pressuring it, but a cluster of dynamite sticks taped to the outside and detonated may or may not crush a safe door down onto the inner contents of the safe. Despite what you may have seen on Butch Cassidy and the Sundance Kid, safes don't blow up nicely.
Translation: you will need a very big, very expensive drill to place the nuclear device at a strategic place. Assuming it was powerful enough, that is.
When you come down to the many trade-offs, it's far easier to just (1) monitor the volcano, and (2) evacuate people when it's restive behavior starts accelerating and the seismometers start going ape on you.
"C" is just a numbers game. The Hiroshima uranium bomb and the Nagasaki plutonium bomb had estimated explosive yields between 12,000 and 20,000 tons of TNT. For you metric nerds out there, a metric ton of TNT equivalent is a bit over 4 gigajoules. Mount St Helens' 1980 eruption was a VEI = 5 level blast. That's short for Volcano Explosivity Index, and a VEI 5 is about 10 times bigger than a VEI = 4; the values are approximate, and approximately logarithmic. The 1980 eruption of Mount St Helens released the equivalent of 20 million tons of TNT. That's between 1,000 and 30,000 times more energy released than the Hiroshima atom bomb.
The eruption of Yellowstone supervolcano about 640,000 years ago has been estimated as a VEI = 8 event, or 1000 times larger than the 1980 Mount St Helens eruption. That's between 1,000,000 and 30,000,000 times the power of a Hiroshima bomb.
Translation: a nuclear device is to a VEI 5 volcanic eruption, as a fly doing push-ups is to you doing push-ups. I may be exaggerating a bit with the fly, but you get the point. Volcanoes are BIG. That's why no one has ever seriously considered engineering around a volcanic eruption. Just get out of the way if you can.
If you want to open a can of spinach, ya gots ta squeeze it, to quote Popeye. No sissy atom bombs.