Use Formula 420 .... it is awesome.

They have different versions for glass/metal and plastic. I haven't tried the plastic - since I got a glass water pipe, I haven't used anything else. I've let the glass get really bad from time to time, and this stuff cleans it out like new.

It looks like it's a mixture of rock salt and a sweet smelling liquid. You pour it in, shake it up for a minute (longer for really dirty ones) and you're done. You need to rinse well afterward. Make sure you shake it up well before use, or you won't get the salt in there, and you'll waste it. You might need to use a pipe cleaner to work some stuff loose.

I find it at my local head shop for about $8 for a 12 oz bottle. One bottle usually lasts me about 2-3 cleans.