The branch that punishes pirates is the judicial branch. This branch is responsible for interpreting laws and administering justice, including punishing those who violate laws such as piracy. The executive branch enforces laws but does not directly handle punishment, and the legislative branch creates laws but does not punish individuals.