The so-called deterrent effect is one of the main arguments in favor of capital punishment. I’ve argued many times before that the data we have don’t support the existence of this effect. Some of the data even suggest the possibility that instead of a deterrent effect, capital punishment has a brutalization effect (because it sends out the normative message that violent retaliation is the normal response to ill-treatment and that the sanctity of life is a naive moral ideal).
The following quote nicely summarizes the difficulty of proving the deterrent effect:
I would like to know how a statistical study, no matter how sophisticated, can possibly tell us the subjective motives for acts that were never taken and, moreover, how it can do so with the specificity of telling us approximately how many people did not do what they otherwise would have done under different circumstances. Where are these people? And, more importantly, how would we recognize one if we happened across him or her? (source)
Of course, people who want to disprove the deterrent effect also face this difficulty, but I assume we can agree that the burden of proof is on those who want to use the effect as an argument in favor of capital punishment. And that turns out to be a very heavy burden in this case.
Anyway, even if deterrence could be proven and even if we could establish with some certainty that every execution saves n lives – as some have argued, oblivious of the difficulties pointed out in the quote above – then we would still have good reasons to reject capital punishment.