In philosophy of justice, one of the questions regarding justice is how should a just society punish its citizens that commit crimes? There are five typical proposed approaches: deterrence; desert; communication; containment; and expressivist. To compare like for like, all forms will consider capital punishment (the death penalty).
Deterrence is the view that how we should punish someone ought to be the way that deters either the criminal from reoffending, or deter others from reoffending. So, one could try to justify the death penalty for crimes such as stealing (something that was done in the past). However, most of us today would reject this, since no one would accept that a thief deserves such a punishment.
This is why others will argue punishment based on how much the person deserves a certain punishment. However, there will be some punishments that even though we think the individual deserves it, it is not the role of the state to inflict. Many reject capital punishment outright, even if they can accept there may be people who deserve it.
Others will see punishment as way of instructing the criminal to understand their wrongdoing, so they will behave differently in the future when they re-join society. However, for certain crimes that are so heinous some people would desire at least life imprisonment, or at the most capital punishment, regardless if they are rehabilitated.
Some will see punishment as a means to take away the ability for criminals to reoffend. Anything from taking your driver’s licence away to life sentence. Capital punishment could be seen as a form of permanent containment, but normally would not be used in this sense. Life without parole would be the more common use of the containment argument.
An expressivist approach is that the punishment reflects the overall society’s condemnation and outrage at particular offences. So, someone wishing to defend capital punishment against someone claiming that it doesn’t deter and that no one deserves it, regardless of the act, could try to argue that the punishment is an expression of our view on the crime being committed.