One of the reasons that people worry so much about connections between pirates and terrorists is that the two groups exist in the same legal netherworld. Drug traffickers also inhabit this world, which is why we get absurd arguments about how the terrorists will win if people smoke marijuana. Moises Naim, editor of Foreign Policy, wrote a book on this issue called Illicit, although his work focused more on intellectual property theft than maritime piracy. The upshot is that while the simple story about how drug dealers and pirates help terrorists is wrong, there's a more complex story about financial flows and financial methods that are shared by all such illicit groups. Pirate money may not go directly to terrorists, but it does become part of a shady pool of finance that is drawn upon by terrorists and other illegal groups. Incidentally, one of the best things about Casino Royale is that the film put the spotlight specifically on this aspect of terrorist funding; it's perhaps the first time that a James Bond movie has credibly discussed an actual public policy problem.
Via ID, an AP article discusses these issues in the context of piracy and the Somali diaspora:
The dramatic spike in piracy in African waters this year is backed by an international network mostly of Somali expatriates from the Horn of Africa to as far as North America, who offer funds, equipment and information in exchange for a cut of the ransoms, according to researchers, officials and members of the racket. With help from the network, Somali pirates have brought in at least $30 million in ransom so far this year.Part of the money that the international community pays in ransom goes to Somali fishing villages, but a large part also goes to the diaspora, and to various middlemen along the way. Since no banking system to speak of exists in Somalia, no one knows what money goes where, or precisely how much stays in Somalia. Piracy functions as a large scale, transnational criminal enterprise, and funds itself through the same methods used by drug traffickers and terrorists. Thus, it's not quite right to say that there's no connection between the three; once the financial methods and middlemen are developed by one group, they can very often be readily used by another. Accordingly, there might well be good reason to think that making some of the illegitimate money legitimate (drug legalization, for example), or cutting down on the flow of money (fighting piracy and thus removing the necessity to pay huge ransoms) would have an impact on how terrorists fund themselves."The Somali diaspora all around the world now have taken to this business enterprise," said Michael Weinstein, a Somalia expert at Purdue University in Indiana. He likened the racket to "syndicates where you buy shares, so to speak, and you get a cut of the ransom."
--Robert Farley