ORIGINAL: Panzerfaust77
So what happens when the pirates manage to take over a ship with that kind of armament? Adding more guns is a bad idea - that was the US police force's response to the US constitutional right to carry arms and the result was inevitable; everyone became more dangerous and every situation became 100x worse. You do not want civilian ships sailing around with guns on board; self-defense weapons like tazors maybe.
Piracy is the result of economic imbalance - you've got shipping from 1st world nations sailing past one of the poorest countries on Earth. Sort out the problems in Somalia, get a functioning government in place and this problem will go away.
I can see it now, Pirate climbing a caving ladder with AK47 and some bloke runs up to him with a stun gun, wonder what the outcome of that encounter would be? For one, I cannot imagine anyone with a tazor approaching bad guys with AKs and RPGs anyway!
The weapons act as a deterrent, If the tangos know such and such line has an active defensive capability they'll move on to easier prey. As a kid once we were motoring through a yacht club and one yacht stood out from all the others. It had 2 Browning .30 caliber machine guns above the bridge wings! I'll never forget that!
If I had a big yacht I'd put one of these on it to act as a deterrant: