If those large cruise ships are steady, a good shot could make swiss cheese out of one of those boats and their crews at a good distance.
Also wonder what the legalities of having arms aboard a cruise ship in certain ports.
Based on the pictures I saw, I would want an AR-15 with a good supply of 30 round magazines. It appeared that the attackers were relatively exposed and relatively close. I would hope to be getting one-shot/one-kill with quick, aimed fire.
I think there is a class of body armor that could withstand AR-15 fire, but I would be surprised if these guys had it. If they did, then the .50 becomes more of an asset. It's probably going to go through the armor, through the pirate, and through the boat. But the magazine is probably six or seven rounds, so the hit rate has to be really good. An AR-15 is a handy weapon to fire. I have never fired a .50 but they weigh a great deal and aiming one over the railing of a ship might be quite a challenge.
Now if a person had a .50 caliber machine gun such as those once found on a B-17, that would be a different matter. With a thousand rounds in the belt and the ability to aim at the boat, the whole shebang is just going to get shredded.
Unlike boats, ships have the capacity to carry heavy weaponry and literally tons of ammunition. With present day naval security these boats would not have survived the attempt to approach a US Navy ship such as they did with the cruise ship. Any vulnerability to pirates is by choice of the cruise lines and not by necessity.
My wife and I were on a cruise ship docked in the river at Shanghai just a month after 9/11. There were small boats patrolling the waters around the ship to ward off any attackers and to watch for any underwater activity that could jeopardize the ship. I'm pretty sure they were prepared to do more than just make loud noises to scare off attackers.