When you hear a hammer in a community shop it is worth a quick look to ensure there is a real need for that type of tool.
One good use of a hammer is to get an axle 90% straighter, by rolling the axle back and forth with one hand and delivering a moderate blow to the bent side with your other hand (hold the rim against your chest, perpendicular), when it is obvious the bent part of the axle is in the 'up' position.
Deliver the blow to the axle nut- which must be on the bent side- so you do not damage threads. Not the best method, as slight damage can be done to the cone and/or bearing, yet for many bikes it is good enough and sure beats full axle replacement.
Bent axles almost always occur on the drive side of a rear wheel (where the most torque is applied during riding probably).
-Bob Giordano