I disagree.
The only reason a nuclear weapon has the kind of destructive force we see is because of the atmosphere. Oxygen and nitrogen are fairly opaque to high energy radiation which is a good thing or cosmic radiation would eventually kill us. Since it is opaque it absorbs prompt neutrons, x-rays, and gamma radiation and almost instantaneously converts them to heat. This heat is manifest in temperatures at the shock from of millions of degrees. So high that the air itself becomes incandescent. But because it is so hot, it expands as a true shock wave, carrying the energy of fission through the atmosphere.
As you suggest, were a nuclear weapon to be detonated inside an asteroid it would indeed vaporize some amount of rock. We see this in the subsidence craters formed all over Yucca flats in Nevada. But the amount of rock vaporized is really quite small relative to the scale. Yucca flats isn't that large an area and there are hundreds of craters there. And Orion, as you correctly cite, was designed to use nuclear detonations as propulsion. Note though, that the mass of an Orion starship is miniscule compared to even a fairly small asteroid, say a mile across.
Something the size of Apophis, at 450 meters in the long dimension, would verly likely be broken into smaller pieces by a large nuclear weapon placed near the core. The gravity of Apophis is very low so may not pull them back together and the new trajectories might be altered enough from the initial to result in a miss. A nuclear weapon detonated on the surface though would probably do little to divert it. However Apophis is not a large asteroid, and while it would cause significant damage is no planet killer. Either way, anything you do is going to result in a changed orbit that still crosses Earth's path. The only way to fix that is to change it's trajectory twice in precisely the right direction at precisely the right time.
So the question really comes down to, how big is the object you're trying to 'blow up'? The Texas-sized object on Armageddon - not a chance. There would be absolutely nothing we could do about that. Fortunately, as far as we know, there are no NEO's that large. But there are hundreds of NEOs larger than a kilometer, and the largest is 32 kilometers across - far too large to break up with a nuclear weapon.
Good discussion. If you have any practical information on shaped-nukes I'd like to see it. It's sort of a hobby, collecting tidbits of public-domain nuclear technology. Back in the nineties after President Clinton created the Library Without Walls, which allowed you do download declassified technical reports from the Manhattan Project, I snagged a ton of that stuff. All about critical masses, crossections, neutron spectrums, and refining purified uranium from UF6. After they'd realized their gaffe they shut the whole thing down but we can all rest easier knowing Al Qaeda, and I, and hundreds of others, have pretty much all the information we need to design a 20 KT bomb. All we need is the fissionable material.