I don't know about pirates; but French naval ships in the Pacific did quite a bit of fishing usually catching tuna, but sometimes pulling in a shark or two as well. Tuna was definitely the preferred fish, sharks were seen by some officers are being somewhat deviant or less healthy as they were 'man eaters.' Jacques Labillardiere noted in his logs in the late eighteenth century that the ship could have made a solid profit if it could only saved the fins of the sharks to sell in China; so despite shark not being terribly appetizing or healthy, they knew it could be eaten and in some places was very popular. Various types of tuna (often referred to as dolphin- and still referred to that way in some places) were the most common deep-sea fish that they caught often just baiting a line and letting it run behind the ship.
Unfortunately I don't have my notes on his logs and some of the other eighteenth century French naval ships that came into the Pacific- believe it or not I kept a tally of all the animals they caught/ate/stuffed during their travels. Other common sea animals they would capture if sighted included seals and turtles-- things like whales (for anyone wondering) were far too big to realistically go after.
Otherwise, the main source of food was what the ship carried, and this varies wildly across the century- sea biscuits and fresh water are givens- but otherwise it really depends. Most voyages across or through the Pacific counted on making stops along South America, or at specific islands at which the ships could take on fresh food and water. So they didn't usually have the supplies for their whole voyage and so fishing was a great way to help stretch what they had before they could resupply.