Somalian Pirates are a thing, though there are fewer of them recently as crackdowns both on and offshore have had their effect.
As countries destabilise, greater space is created for the chaotic elements of society. Religious extremists, political extremists, organised crime, disorganised crime. Much of the time they're related, the one using the other to fund their activities.
But what would lead to an increasing breakdown in national governments?
Climate change is an easy one here. There's a theory that the Syrian war is related to global warming, as the country dried out the rural population moved to the cities for work and food. When it turned out that there wasn't enough work and food in the cities either the old rule about civilisation being four missed meals from anarchy started to bite.
Large parts of the Near East and Africa are vulnerable to this sort of disruption. Perhaps further afield and closer to home as well as things get worse over the next few decades, so it's entirely reasonable that pirates would appear in increasing numbers to prey on the shipping of the remaining stable countries as regions start to break down.
Can pirates ever be cool?
No, killing people for money or threatening to do so is never cool. Though the romance of a life on the edge is undeniable from a safe position, it's not such a great thing in practice. Leave the swashbuckling to the movies.
I won't go into detail on firearms as we've covered that many times before and it's really hard to do.