If you never had hammering and then it suddenly starts, most likely your plumbing system's air chambers have become waterlogged. You can cure water hammer by turning off the water behind the waterlogged chamber, opening the offending faucet and permitting the faucet to drain thoroughly. Once all the water drains from the chamber, air will fill it again and restore the cushion. If the air chamber is located below the outlet, you may have to drain the main supply lines to allow the chamber to fill with air again.
The air chamber will not drain properly if it's clogged with scale or residue from chemicals or minerals in the water. The chamber always should be larger than the supply pipe to preclude such clogging. Since the chamber is simply a capped length of pipe, however, all you have to do to clear it is remove the cap and clean out the residue.
If this fails to work there are more remedies.