If you are the one who has some kind of punishment, then it signifies the guilt you are carrying with yourself and think that you deserve this punishment. If you punish someone in a dream, then it shows that you have some unexpressed anger or unsolved issues.
Punishment (Corporal) dream meaning
Read more about dreaming of Punishment (Corporal) in other dream meanings interpretations.