Is this a myth, or is it true, and if so why?
It's hard to say why it was liked from individual to individual, but in the Caribbean, rum was available. It was made locally by many. The sheer convenience of having a local product in comparison to the cost of importing something else makes it likely that it will be consumed more in large amounts. On top of that, rum kept well in the warm climate, better than the other alcohols. Madeira Wine is also a popular import to the Caribbean at the time, it being a wine that kept really well in that climate.
As for pirates - it kind of assumes that pirates stood out back then as liking rum more than other groups of people. They drank rum, but they also drank brandy, wine, and anything else they could get their hands on. Pirates during the early eighteenth century were mostly former sailors, and sailors drank rum or anything else they could get their hands on, though British sailors back in Britain appeared to like the drink called flip (with some caricatures of sailors at the time describing them drinking it, or being humorously named "Flip"), flip being a mixture of beer and spirit sweetened with sugar and heated with a hot iron. Pirates and sailors drank whatever was available. In the Caribbean, rum was available. Why the stereotype for pirates? Because historical pirates are so heavily associated with the Caribbean, they get a Caribbean drink associated with them as well. It's not that they didn't drink it, it's that they wasn't anything particularly special about it. Honestly, if anything, back in that time there would have been some lower class connotation with drinking rum. It was heavily consumed by the lower classes (the upper class being able to afford finer alcohol), and it was made cheap enough that they used it in trade on the African coast.
One really good source on the history of Caribbean rum production: Smith, Frederick H. Caribbean Rum: A Social and Economic History. Gainsville, FL: University of Florida Press, 2005.