Not so much. There's nothing out there in space for the explosion to push against. You could break them apart, maybe. You could pad the bomb with propellant mass but that won't really work in the case of an asteroid. (It's extremely difficult to direct the energy while capturing enough of it to be useful, so you need small bombs and lots of them. Then you have the ablation problem on the surface of the pushee - ie the asteroid.) Project Orion explored the concept of bomb propulsion at great length.
Two references for you:
Pale Blue Dot, by Carl Sagan, contains a thorough exploration of the technology required to divert earth-bound asteroids, and the consequences of possessing that technology.
Project Orion, by George Dyson, is the definitive history of the 1950's & '60s project to construct a nuclear bomb-powered spacecraft capable of crossing the solar system in months.