Islam is often accused of having legislation that encourages retaliation rather than forgiveness. But the Qur’an itself refutes this, saying:“But whoever overlooks from his brother [i.e., a killer] anything, then there should be a suitable follow-up and compensation to [the victim›s heir] with good conduct. This is an alleviation from your Lord and a mercy.” 
“And the retribution for an injury is one like it, but whoever pardons and makes reconciliation – his reward is [due] from Allah. Indeed, He does not like the unjust.” 
Justice is the ruling spirit of Islamic law. However, the changing definition of terms such as civilized, freedom and equality have resulted in criticism of Islamic laws and the argument that in view of the changing world, the Shari›ah is outdated. To a believing Muslim this amounts to denial of the wisdom of God who put us on this earth with a purpose in life and a responsible role to fulfill.
Punishment has always been an integral part in the concept of justice. Islam considers crime an act of injustice towards society as well as a sin. Punishment is not atonement for sin because a sin can only be forgiven through sincere repentance. A crime, however, is the infliction of harm upon others which cannot be forgiven by repentance alone.
The object of all penal systems is to punish the offender and protect society from reoccurrence of the crime. However, if societies were to rely only upon punishment, they would fail miserably. An environment of healthy morality and faith must be the norm, where right conduct is encouraged by all and wrongdoing is opposed and made as difficult as possible.
In Islam, penalties are only part of a larger integrated whole. They cannot be properly understood nor justifiably implemented in isolation. God has ordained a body of mutual rights and obligations. He has also set certain bounds and limits in be observed by everyone for the maintenance of justice. If men and nations want to have peace and safety on the highways of life, they must remain within the traffic lanes marked out for them and observe the signposts erected along their routes. Otherwise, they endanger themselves and others and thus subject themselves to penalties – not out of reprisal but in order in regulate and preserve orderly interactions among all people in society.
In many non-Muslim societies today, there are ongoing debates about the death penalty. In Islam the matter has been decided by the Creator, who said:
“And there is for you in legal retribution [saving of] life, О you [people] of understanding, that you may avoid [sin].” 
The verse alludes to the fact that such punishments serve as a strong deterrent to crime. They are of a functional nature, to regulate and prevent reoccurrence.
There are basically three categories of punishment in Islamic Shari›ah: First is hadd, fixed punishments for a few specific crimes that were divinely ordained. Second is qisas, for homicide and assault, in which the victim or family of the deceased has the right to legal retribution or else to accept monetary remuneration or even to pardon the offender, both of which serve to avert capital punishment. The Qur’an highly recommends forgiveness. An injured party may take particular circumstances into account or overlook the offense with the expectation of being compensated by God in the next life. And third is ta’zeer, which is a discretionary penalty decided by the court. There are stringent conditions which must be met for any of these to be applicable, and strict procedures must be followed before any person can be convicted and punished.
Another important function of these penalties is educational. They are intended to instill in society a deep feeling of abhorrence for transgression against fellow human beings and against God. Once one understands the basic concepts, objectives and framework of Islamic Shari›ah, he cannot but conclude that it is capable of creating the most humane and just society. Difficulties arise only when critics try to measure the ocean of divine knowledge, wisdom and justice with their own imperfect criteria and understanding.