Few countries still have the death penalty. It is barbaric and has almost zero deterrent effect. It is also far more expensive than lifetime incarceration due to the many appeals that are necessary to reduce (not eliminate) the incidence of executing innocent people.
The death penalty is based on the retributive theory of punishment, which is strongly linked to the ethics of the Old Testament. Utah will probably be one of the last states to change due to the specific approval of the death penalty in the Book of Mormon.
The death penalty isn't (and cannot be) an effective deterrent because so few people receive it. The two primary factors in deterrence of crime are (1) the severity of punishment and (2) the surety of punishment. Capital punishment succeeds with (1) but completely fails with (2).