Justice for repeatable evil and Forgiveness for preventable evil
You should forgive when the evil actions are not to happen again. Justice should be brought wherever there is a tendency to repeat the errors. Justice is for evil-prevention and forgiveness is for the peace of hearts. Many times they go together. Forgiveness without justice can be of evil itself.