Different religions have different ideas about the death punishment. Islam on the whole does allow the death penalty. The Quaran satates that you should not take a perosns life because God has made it himself. The only exception for it is whe it is the 'way of justicer and law'. (Qur'an 6;151)
In Isalm the death penalty is allowed howwever it is believed that forgiveness is the best way to go and for you to live togethr in peace without conflict. Most Muslims belive that the death punishment is the worst of punishments howver if it is the appropiate punihment for a crime then it may be declared.
In Islamic countries there are lots of different ways to have an execution such as firing squad, being hung,stoned or even beheaded. There are even some Islamic countries which allow public executions to strength the concept of deterrence, essentially showing people what will happen to them if they commit a terrible crime and acts as a warning.
The death penalty is given to people who; Carry out intentional murder, so in this example the family of the victim is given the choice as to whether the crinmal should face the capital punishment or not.
It is also declared to people who act as a threat the the government and people or casuse troubleThis is know as Fasad-fil-ardh. And crimes usually associated with is are;
Terrorism Rape or sexual assault Homeosexuality Or treason so if one turns its back against the faith.