Islam possesses a religious law called al-Shari'ah in Arabic which governs the life of Muslims and which Muslims consider to be the embodiment of the Will of God. The Shari'ah is contained in principle in the Quran as elaborated and complemented by the Sunnah. On the basis of these principles the schools of law which are followed by all Muslims to this day were developed early in Islamic history. This Law, while being rooted in the sources of the Islamic revelation, is a living body of law which caters to the needs of Islamic society .
Islamic laws are essentially preventative and are not based on harsh punishment except as a last measure. The faith of the Muslim causes him to have respect for the rights of others and Islamic Law is such that it prevents transgression from taking place in most instances. That is why what people consider to be harsh punishments are so rarely in need of being applied.
"When a person dies, his works end, except for three: ongoing charity, knowledge that is benefited from, and a righteous child who prays for him."
Prophet Mohammed (PBUH)
"The best of what a man leaves behind are three: a righteous child who supplicates for him, ongoing charity the reward of which reaches him, and knowledge that is acted upon after him."
Sunan Ibn Mājah
"Every day two angels come down from Heaven and one of them says, 'O Allah! Compensate every person who spends in Your Cause,' and the other (angel) says, 'O Allah! Destroy every miser.'"
Sahih Bukhari