There are times and places where violence IS the answer. No justice system is going to be perfect in every case. So long as we try and do our best to ensure that the justice system is as fair and accurate in how it works, the outcomes can be considered fair. We should strive to make the system fairer, but also punctual. I'd say the biggest issue with our current justice system is it is anything but speedy. It can take years for a case to wind through the courts and appeals. That's as bad or worse than making a mistake in a case.
As for your original question here: do we deserve to kill, not do they deserve to die, there are times when yes, someone deserves to die and we have an obligation to carry that out to stop further killing by the person condemned to die. If a person has exhibited through word and deed that they are willing to murder, rape, or violently assault others, and that punishments such as prison will not stop them, then yes, they should be put to death. It is far worse that we accede to their actions by keeping them alive.
That is, in putting them to death we used the only sure method available to stop them from committing more murders, rapes, or violence. Those who would be victims of this person's future crimes, which are all but ensured to occur, and have been exhibited by their behavior to present, are saved from that fate by the person's death.
The question back to you is, Which is worse, allowing someone to live who goes on to commit more violence and death so we can somehow claim superior moral standards, or putting that person to death and stopping their endless violence and death?