to make someone suffer or lose something because they have done something wrong or broken a rule
The judge punished him for driving drunk.
The school punished the students for cheating.
In this meaning, use for to give the reason: punish someone for something.
Common phrases & grammar
punish someone for breaking the rules · punish a child · punish someone severely
punish + someone + for + something
punish + someone + by + doing something