I'm going to have to disagree with Umbran on this.
The bread and butter of a pirate tactics are concentration of force and closing to knife fighting range. At any range shy of point blank, the pirate force is at a disadvantage against its likely foes.
a) Cannon: The pirate is unlikely to be particularly skilled with a cannon, especially compared to navy gunners. Their ships are also likely to be lightly built civilian craft unable to resist cannon fire. If the target is at a distance, and shows sign of putting up a determined cannonade, then the fight is not in the pirates favor. Besides which, powder and shot are expensive. If it becomes a cannon fight, the pirates will probably break off the attack. If the British navy closes, it will likely continue cannon fire until the opposing vessels resistance appears to be breaking. Pirates will immediately begin a boarding action.
b) Muskets, Pikes and Bill Hooks: If the pirates can board the ship, the defenders next best recourse is a determined pike wall supported by musket fire. The pirates are not disciplined military. They are not drilled in formation tactics. They are not fighting for a cause. They are mercenaries. Faced with a determined defense where its clear that casualties must be endured in order to break the wall of defenders, the pirates will probably retreat and look for easier prey in better situations.
c) Knives, axes, and cutlesses: It's at this point that the pirates gain the upper hand. If they can turn the fight into a chaotic melee, things will likely go very well for them. Merchants carry as little crew as the ship will allow because crew is a cost. Pirates carry a much crew as the ship will hold because crew is a resource. They probably outnumber their foes. They also have alot of practice with chest to chest fighting. It's at this range that the pirates numbers and ferocity will be most telling, and the foe most likely to surrender and hope they are ransomed (or in the case of crew, allowed to throw in with the pirates until at least the next port).
The skilled pirate captain will therefore arrange to ambush ships as they come around points of land, or else to attack by cover of darkness. He will attempt to board as quickly as possible and overwhelm the defenders. He will encourage his men to charge quickly and grapple their foes to negate any advantage they might have in superior organization, training, or weapons. He will prefer to fight any of his foes at at most arm's length, using a short bladed weapon and usually a large number of preloaded pistols which he will only fire at point blank range. He will cultivate a reputation for ferocity and a distinctive appearance, but simultaneously a reputation for courtly behavior and generousity to his captives. This is the most likely to result in people simply surrendering rather than fighting to the death. Unlike in the movies, a reputation for never taking prisoners is the death of a pirates career.
This is the admirable strategy for the pirate admiral.