Anger is an emotion which one displays when someone does the wrong thing, thats the only way we can show displeasure for sin. God does not like sin , so for us to know he does not like it, He gets angry about it and is always ready and willing to forgive us, when we realise our mistakes and turn to Him.
However uncontrolled anger can lead to sin, when one is angry and cannot contol it a whole lot of damage could be done and wrongs that cannot be made right, while anger that brings about justice is one that gives room for correction, taking an example of a man who commits a crime, the society igets angry with him, he faces the law and probably goes to prison which is just for what he has done, and this serves as a corrective measure, this helps and stops him from going back to that sin.