A water hammer is caused by fast-closing valves, like toilet fill valves and faucets. As the water flows through the pipes and the valve shuts off quickly, it causes the water to stop suddenly in the pipes, causing the hammer effect.
http://articles.courant.com/2013-03-23/business/hc-ls-water-pipes-rattling-20130323_1_water-hammer-air-chambers-pipes
1 Prolonged noises and vibrating are usually caused by air in the pipes. 2  If noise or sputtering occurs when you close a water valve, or an appliance such as a dishwasher or washing machine switches cycles, it is more likely to be water hammer than air in the pipes.
http://homeguides.sfgate.com/fix-air-water-pipes-35101.html
Visibly inspect your pipes in open areas to see if there is a lot of movement when someone in the home turns faucets on and off or flushes a toilet. Another issue could be that your water pressure is too high, which can cause pipes to vibrate and also lead to long-term damage to your pipes and appliances. Highly rated plumbers I've spoken to in your area say the indoor water pressure should be between 40 and 60 pounds per square inch (PSI).
http://articles.courant.com/2013-03-23/business/hc-ls-water-pipes-rattling-20130323_1_water-hammer-air-chambers-pipes
Summary. Piping vibration, if severe enough, can cause failures. There are two main categories and several different types of piping vibration. The type and cause of pipe vibration must be determined before it can be dealt with effectively.
http://www.carmagen.com/news/engineering_articles/news15.htm
The two major vibration categories are steady-state and transient. to 300 Hz). Low frequency vibration will typically cause lateral displacement of the pipe, while high frequency vibration can cause flexural vibration of the pipe wall itself in addition to lateral pipe movement.
http://www.carmagen.com/news/engineering_articles/news15.htm
If noise or sputtering occurs whenever you open a water valve or a faucet, you most likely have air in the pipes. Sputtering faucets, irregular water flow and vibrating pipes may indicate that you have air in your water lines.
http://homeguides.sfgate.com/fix-air-water-pipes-35101.html
The high water demand created by turning on all of your faucets causes a rush of water through your pipes that carries the air bubbles out of your water supply.
http://homeguides.sfgate.com/fix-air-water-pipes-35101.html
By Vince Carucci. There's no question about it-excessive piping vibration can cause real problems. Threaded connections can loosen. Flanges can start leaking. Pipes can be knocked off their supports. And in extreme cases, a pipe fatigue failure can occur.
http://www.carmagen.com/news/engineering_articles/news15.htm
3. Flush all toilets and run the water in all appliances or fixtures that use a water connection. For example, fill a cup with water from the refrigerator dispenser and run the dishwasher and washing machine through a rinse cycle.
http://homeguides.sfgate.com/fix-air-water-pipes-35101.html
In four of the baths, when the toilet is flushed the water cutoff causes the pipes to vibrate very loudly somewhere in the wall or ceiling. Turning off the cold water faucet at the sink also causes a vibration. We've had three different plumbers out. They have cut through walls in two different rooms and failed to locate the section of pipe that is causing the problem.
http://articles.courant.com/2013-03-23/business/hc-ls-water-pipes-rattling-20130323_1_water-hammer-air-chambers-pipes
what causes pipes to vibrate
Air in the pipes causes it to vibrate. Air in the pipe causes it to vibrate.