Although comic books and action movies glorify vigilantism, it is heavily frowned upon to engage in it in real life because one person acting as judge, jury and executioner violates due process of law and can lead to pointless bloodshed. Also, as the quote goes, "Who watches the watchmen?"
Societies have laws in place to provide an objective standard of determining guilt and administering punishment, according to a shared and agreed-upon moral code that applies to everyone equally. If one person engages in vigilantism, it's easy for people to think "Well, if he can do it, why not me?" leading to a rash of copycat vigilantes. In addition, would-be vigilantes who attack perceived criminals can do so without proper training and without enough evidence that the person in question is guilty under the law. Western nations operate under the Rule of Law, meaning that the code of law exists separately from human will.
Vigilantism of the violent sort can create a cycle of violence that escalates out of control. Family feuds, such as between the Hatfields and McCoys, or any number of medieval Japanese samurai clans, serve as examples of private citizens taking the law into their own hands and causing war and violence.