It really depends on the circumstances. There can be no absolute ruling noon this question. But this must be strongly reminded that Islam is predominantly a religion of mercy and forgiveness.
Revenge and punishment are reserved only for exceptional situations when all peaceful means are already exhausted but still a severe and very likely hazard remains associated with forgiving and giving the enemy a second chance! Don't forget that the Holy Prophet forgave and forgot about the consistent vicious antagonism and atrocities of his most sworn enemies when he defeated and conquered the militant infidels of Mecca while having absolute authority over their life and death. This was the utmost manifestation of magnanimity and mercy with hardly any precedent in history of mankind.
That's why mawadda (love), rahma (compassion), maqfira and ra'fa (forgiveness) are among some of the most widely used attributes of Allah in Islam, and also main characteristics of its Prophet.