Well, all those cases are death penalty cases, which I think is a special type of case. But it's widely acknowledged that there's some general and specific deterrence applied to other types of crimes.
***
Criminologists widely believe that the likelihood of punishment deters crime. We call this "general deterrence," when applied to everyone, and "specific deterrence" when applied to a specific person.
For instance, if Defendant A commits crime X, and is convicted and punished, deterrence theory would posit that Defendant A has had a degree of "specific deterrence" applied. Defendant A is less likely to commit crime X again, than if Defendant A had not been punished.
Generally deterrence functions thusly: because we punish crime X, people are less likely to commit X. Thus, the theory goes, if we punish the crime more harshly, or if we increase the likelihood that the punishment is meted out, the effect of the general deterrence is stronger.
A recent publicly available study of the effectiveness of deterrence (in regards to add-on gun laws) can be found at
Abrams, David, Estimating the Deterrent Effect of Incarceration Using Sentencing Enhancements (January 2011). U of Penn, Inst for Law & Econ Research Paper No. 11-13 .