I disagree:
1. Who's "defining" that he is a bad man?
While protecting my family, I am.
The principle "no penalty without judgment" is part of Islamic rulings as well as for almost all modern stately rulings (it's another subject that there are states where stately prosecution doesn't work or/and the state is ruled by criminals).
So if a person is murdering your wife in front of you, raping your child in front of you, your answer is to stand by and had the matter over to the authorities and hope they catch the criminal and hope the matter goes before a truthseeking court? When you could have stepped forward and at least made a sincere attempt, even at the cost of your own life to defend those you love and care for and nurture?
Another line from the Desiderata:
As far as possible, without surrender, be on good terms with all persons.
You are making no provision for self defense, that is an error of logic.
Death penalty is restricted to a few deeds; classical Sharia mentions rape, adultery, treason, and murder, of which the latter two will only be executed on request of the state or the relatives, respectively. According to John 8, adultery may/should be subject to conditional punishment. Many western countries and U.S. states have abolished death penalty for several reasons.
In the moment, none of this matters. A just judge will recognize the situation and exonerate the ones who were attacked. If courts are not just, then the law doesn't really matter anyway.
2. Modern penal systems aim at repentance and reintegration of the offender. This goes well along with Islamic legislation, and even more with Christian teachings. Our first goal should be to incite the sinner to repent and start a new life with the help of God.
See my previous answer. If the mother and father taught the child or allowed the child to be taught to be a criminal, a murderer, a rapist, then why should the parents get rights that are stolen from the family attacked?
There's little chance to survive unless the entire society, organised by the state, fights those people. I don't deny that violence including shooting may be necessary facing armed organised crime. Allowing anyone to shoot anybody without an organised frame will not end violence but usually produces many innocent victims.
There are studies that show quite the opposite.
Police cannot be everywhere. Sometimes they don't even bother to show up.
And in the incidence of war, all bets are off. The old saying is that all is fair in love and war...unless a gummint chooses to follow the Geneva Convention.