As regards the concept of punishment in Islam, it needs to be stressed that to understand why a certain punishment in Islam is prescribed for a crime we need to know first of all the nature of the legal system that set the punishment, what are the objectives to be realized behind the prescription of such punishment?

Punishment has always played an integral part in the concept of justice. We all know or at least expect that if you do something wrong you are subject to punishment in some way or another. This is only fair. Humankind is charged with the responsibility for the choices they make. This is because they are created with the freedom of choice and granted the moral sense of right and wrong. Accordingly, one is not to be punished for the actions of others, or for acts done under duress or because of insanity. All people are equal and innocent until proven guilty: only then punishment is considered.

Islam considers crime an act of injustice towards society, a sin against oneself and a transgression against Allah. Punishment is not atonement nor does it erase the sin. A sin is only forgiven through repentance. However, crime is an act of inflicting harm upon society that 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. Punishment serves as an educational purpose, as well as a form of crime deterrent and prevention and the system used must achieve this aim. However, if societies were to rely only upon their systems of punishment, they would fail miserably. An environment of healthy morality and faith must be the norm, where to do right is encouraged by all and to do wrong is discouraged and found difficult. In fact, encouraging right and forbidding wrong is a foremost duty in Islam.

Most penal systems in today’s societies are based and dependent on the current social sentiment. In Islamic law, punishment is based upon divine revelation. There is no leeway for sentiment or possibility of change. These laws were established by the Creator who is Infinitely Wise and Merciful, Who knows the true affairs of the world better than humankind. To seek justice without recourse to divine help would be tragic, as all other sources of knowledge and theory are flawed by human imperfection.

Justice is the ruling spirit of Islamic law, which is known as the Shari`ah. One of the main reasons for which the Prophets (peace be upon them all) were sent were to guide mankind to justice.
In this connection, Allah, Most High, says, (We sent our messengers with clear signs and sent down with them the Book and the Balance so that men may conduct themselves with justice. ) (Al-Hadid 57: 25) and [O you who believe, be upholders of justice, witnessing for Allah alone. ) (An-Nisaa‘ 4: 135)
Changes in the world as well as the changing definition of concepts such as “civilized”, “equality”, “freedom”, and “justice” have caused a critical light to shine upon Islamic laws. Such critics charge that the Shari`ah, in view of the changing world, is an outdated system of laws in need of amendment, replacement or abolishment. Views of this sort express rejection of divine guidance and even worse, rejection of the wisdom of our Lord who has put us on this earth with a purpose in life and a set of rules to live by and achieve that purpose. These rules are the ultimate criterion of justice and mercy and cannot nor need not be changed or measured against the changes and desires of society. To imply such is to imply imperfection in Allah as Lord and Master of the Universe.

There are basically three categories of punishments in Shari`ah:

The first is Hadd, which includes divinely prescribed forms of fixed punishment based upon the Qur’an and Sunnah. These are punishments set to preserve the public interest; they cannot be lightened nor made heavier, nor can the offender be pardoned. They instill a deep feeling of abhorrence in the society towards the crime for which the offender has been punished. Such crimes include drinking alcohol, armed robbery, theft, illicit sexual relations, apostasy, and slanderous accusations of promiscuity.

The second form is called Qisas, which is the punishment for homicide and assault. Whenever a person causes physical harm or death to another, the injured or family of the deceased has the right to retaliation. A unique aspect of Qisas, is that the victim’s family has the option to insist upon the punishment, accept monetary recompense, or forgive the offender, which could even avert capital punishment. This leaves the door open to compassion and forgiveness. Settlements are therefore encouraged outside of court, as a judge must exact the punishment.

All other crimes fall into the third category, Ta`zir, which is a discretionary punishment decided by the court.
So, in the light of this, one cannot just brandish Islamic penal codes as being too harsh or inhumane while neglecting the fact that the source of those penal codes is the Mighty Lord, the Supreme Lord of the Universe. Everything with Him has been measured with absolute perfection. This perfection is reflected in the strict procedures laid down before a person can be convicted and punished. Actually, all forms of punishment stipulated by Shari`ah are more reforming and more successful in preventing recurrent crime than the man-made legal systems whose futility is proved and confirmed by daily incessant crimes, with prisons becoming homes to homosexuality and schools for harboring criminal behavior.

Based, with slight modifications, on “Punishment in Islam: An Eye For An Eye?” Al-Haramain Online Newsletter, Volume 4, Issue 8, 1st Rabi` Ath-Thani 1421 A.H. (July 2000).