Until recently, the Catholic Church accepted the application of capital punishment under certain circumstances.
The traditional catholic perspective acknowledged the right of a legitimate public authority to punish criminals in order to preserve the common good.
St Thomas Aquinas considered the question of whether it is reasonable to kill a sinner. His conclusion was that in order for this act to be legitimate, it must preserve the common good. That is, by killing the sinner, the living are protected from all future actions of the sinner. However, it must be noted, that the time in which Aquinas gave this opinion prisons were primitive and there was no possibility of long term incarceration. The sinner would likely be released back into society at some stage.
Although the Catholic Church accepted that capital punishment was legitimate in some circumstances, the Christian attitude was not to apply it. Instead, it was recommended that the virtues of charity and mercy be extended to all sinners.
In August 2018, Cardinal Ladaria, at Pope Francis’ request, wrote to the Catholic bishops informing them of a revision to articles 2267 in the Catechism of the Catholic Church in relation to the death penalty.
[T]he Church teaches, in the light of the Gospel, that ‘the death penalty is inadmissible because it is an attack on the inviolability and dignity of the person’ and she works with determination for its abolition worldwide – Catechism of the Catholic Church, #2267
The Holy Father acknowledged the acceptance of the death penalty in the past, but explained how circumstances had changed.
Today, however, there is an increasing awareness that the dignity of the person is not lost even after the commission of very serious crimes. In addition, a new understanding has emerged of the significance of penal sanctions imposed by the state. Lastly, more effective systems of detention have been developed, which ensure the due protection of citizens but, at the same time, do not definitively deprive the guilty of the possibility of redemption – Catechism of the Catholic Church, #2267
The Holy Father explains that the dignity of the human person must always come first. He also goes on to explain that the change in the penal system has meant that longer sentences are imposed and the facilities at which criminals are incarcerated have improved significantly, meaning that long term (or even life) incarceration is now possible.