It depends on whether are talking about “specific” deterrence or “general” deterrence. There are actually two types of deterrence; people who haven’t been to law school generally don’t realize that.
There’s no evidence, as you said, that the death penalty is any more effective than any other form of punishment as a “general” deterrent to crime. That is to say, there’s no proof that having the death penalty makes capital crimes less prevalent in a given jurisdiction than not having it.
That said, as a SPECIFIC deterrent, that is to say, as a deterrent to THAT DEFENDANT ever killing again, there is no better deterrent than the death penalty.
Why?
Well, simple. Because once that defendant is executed, you can say with 100% certainty that THAT DEFENDNT will never kill again.
There is some value in that.
After all, suppose you sentence to someone with life without parole, and then the guy ends up escaping and killing again. There are real-life cases of that happening in US history.
That’s one of the strongest arguments in favor of the death penalty: it’s the only form of punishment which, once carried out, guarantees that an individual that is a danger to society will never kill again. It ensures that THAT SPECIFIC danger to society is eliminated with 100% certainty.
In that regard, it serves as a sort of societal “self-defense.” A person can take someone else’s life in self-defense if that person with present ability present a real threat to that person’s life.
Same for society, through the death penalty.
Imagine if we had given McVeigh life imprisonment without parole, and he escaped and killed again.
Fortunately, we don’t have to worry about that, because he’s now dead, thanks to the death penalty.
Likewise, a person given life imprisonment could still commit murder or other crimes while in prison; only the death penalty guarantees that he/she/they won’t, once it is carried out. Again…SPECIFIC deterrence.
There are four “goals” of criminal punishment:
a) general deterrence (no proof the death penalty does much in this regard)
b) specific deterrence (no punishment is better than death in that regard)
c) retribution against and punishment of the defendant by society (no punishment is better than death in that regard)
d) rehabilitation (obviously the death penalty is a failure here, but then again, so is life imprisonment without parole, given that that guy will never (unless he escapes) live out amongst society again)