Your power is limited by the Articles of War, which don't allow a captain (or anyone in the naval hierarchy) to execute someone without a properly convened court-martial. However, the last article:
All other crimes not capital committed by any person or persons in the fleet, which are not mentioned in this act, or for which no punishment is hereby directed to be inflicted, shall be punished by the laws and customs in such cases used at sea.
gives captains fairly wide latitude to punish men either by flogging them, or by other means (confinement in the brig, removal of priviliges, etc.)
Sailors onboard ship were the ultimate guarantors of a captain's power, and if they perceived punishments to be typical or just, they would generally accept taut discipline. They could also mutiny if provoked far enough -- I wrote about mutiny before in the context of the Bounty mutiny, which is really an outlier in naval history, and the mutiny on the Hermione, which are both examples of the crew turning fiercely on their officers. Most "mutinies," however, in this period are more in the nature of traditional work stoppages or slowdowns, often accompanied by a petition to higher authority -- crews refusing to be turned over to a captain known to abuse his authority, or the like.