Further to a discussion of issues around justice and forgiveness, I must point out that in my view, punishment is not in itself a necessarily philosophically sound concept, as others have pointed out.
One obvious reason for this is that punishment is in a sense an evil and a repetition of the original harm.