I know this depends quite a bit on attributes; as well as ship upgrades, ship class, and enemy level/vessels... But this is how I generally the way I do things.
Shadowsail Cutter/Redsail Sloop vs. Pirates & Navy hunters ~ 2-3 Long Gun shots at distance ~ Advance to point-blank, fire one broadside ~ Retreat to mid-range or long-range, fire one broadside (although I normally save the shot) ~ Advance to point-blank, broadside. Repeat until enemy crew is reduced for boarding, or target masts with chain-shot. The idea here is to keep circling, to whittle away at enemy gun-crews & sails before really trying to board.
Pursuit Brig vs. Pirates/Navy ~ Bombard with Long-Guns from long range, until enemy sails/masts are destroyed, and their crew is decimated. ~ Close to point-blank. Fire one broadside, & board them. Often it doesn't require cannons at close range, as the long-range artillery turns them into motionless hulks, so one good broadside with heavy cannon will likely sink them.
Generally I've found that Long Guns damage masts & crew much faster than slugging it out at mid or close range, and do minimal hull damage.... as long as there are a sufficient number of them. Normal cannons do a good job of turning the other vessel into splinters, but rarely dis-mast them unless with a lucky shot.
Hlo- I have two captains; one on crazy, one on hard. Both strategies listed here work on either difficulty... the difference being that battles need to be chosen more wisely against crazy opponents & with upgraded ships only, as at that level they tend to be much more protracted. In any case; entering battle on Crazy difficulty with a base-level ship at low captain level is almost always a recipe for disaster. But at Crazy level, a high Command & Sailing skill with a decent vessel; you can keep an enemy at distance, while pounding them with long-range artillery. Or, go with high sailing attributes, strong fencing, and hope they don't land any shot before you get a chance to board.