Serious offences should attract a sentence of life without the possibility of parole. With that introduced we'd no longer need to worry about the rehabilitation or security of child rapists, serial killers and persistently violent offenders - prison conditions really wouldn't matter too much, because they'd never be released and so any damage would be irrelevant to wider society.
Personally I'd like to see the death penalty brought back, and not just for treason and murder. Serious and repeat offenders should be put to death. A lot of people oppose executions for two reasons; that they are "cruel" and that an innocent person might be executed.
Both those concerns are foolish. The "cruelty" aspect can easily be put to one side. If you believe that hanging is not an instant enough death, simply anaesthetise the criminal on the gallows. If hospitals can ensure someone is unconscious for several hours during an operation, it should be easy enough to put a criminal to sleep before, erm, putting them to sleep.
The idea that innocent people might wrongly be hanged is a red herring. In the current system, people get wrongly convicted too! People who are entirely innocent a dumped into prison for years on end, doing a huge amount of psychological damage to them. In many ways, it would be kinder to execute them in these cases.
All in all there aren't many arguments against the death penalty that stand up in the modern era. It should be brought back for serious offences, and, ideally, be done in public.