Radiation from the bomb will immediately vaporize a thin layer of material on the portion of the asteroid exposed to the detonation. This happens very fast and imparts an impulse to the asteroid. It's an ablation blow-off event.
This will divert the asteroid. How much depends on the mass of the asteroid and the magnitude of the ablation push. The latter is complicated: bomb yield, distance, yield spectrum, asteroid material, etc. If the asteroid is quite fragile (think comet nucleus instead of metal or rocky asteroid), it might break into smaller pieces.
In any event, there's no need for intervening air to couple energy from a nuke detonation to an object in space.
This will divert the asteroid. How much depends on the mass of the asteroid and the magnitude of the ablation push. The latter is complicated: bomb yield, distance, yield spectrum, asteroid material, etc. If the asteroid is quite fragile (think comet nucleus instead of metal or rocky asteroid), it might break into smaller pieces.
In any event, there's no need for intervening air to couple energy from a nuke detonation to an object in space.