To use a hammer in microgravity, you need to be firmly anchored to the object you wish to pound on.
Otherwise, you are at the mercy of action/reaction. As you swing the hammer, half of your effort will be spent moving the rest of your body back/around (it will be a complex motion counter to the swing of the hammer). Also, when the hammer hits, the force will be divided between pushing the item forward and pushing the hammer (and you) back. As a result, only a small amount of force is applied where you want it.
An alternative to anchoring yourself enough to compensate for all the messy angular forces, you can anchor the hammer. Picture a round clamp/magnet with a piston driven hammer in the middle. This would anchor the hammer without dealing with all the messy force vectors.
However, at that point where you are designing in hammer mounts for every nail, it becomes easier to design a different fastener type.