Revenge is an emotionally based response in order primarily to make the perpetrator feel better by causing harm to another, as personal "justice" righted. Punishment is the belief in the value of negative reinforcement as a behavior modification, to promote good or morally acceptable behavior, which may or may not be motivated by feelings of the need for revenge.
Revenge implies that the offender deserves to suffer for what he did. Punishment can have other reasons, to discourage others from committing the same offense, to rehabilitate, to teach.
Revenge is for you to feel better and punishment is for someone else to learn a lesson.