Yes, capital punishment is good, because it is the best way to make someone pay for a terrible crime. Imposing capital punishment on someone who has taken another life, or raped someone, is the best way for the society to be made whole again. The society has more or less made whole on the debt that the person created by taking that life.
Taking a human life is the most serious act a government can take. There is no way to ensure that the criminal justice system only convicts those who are actually guilty an as such it is completely unacceptable for even one innocent person to be executed along with thousands of guilty criminals.
The principal problem with capital punishment is that the legal system used to accuse and convict people is imperfect. Many people are jailed for crimes they did not commit, especially minorities because they are discriminated against. If the state were to execute someone, they could be executing something who is not guilty.