In the Qur'an (32: 9) , God reveals that He has breathed His own soul into Man, His creation, and that Man is His representative on earth (Qur'an, 6: 165). One of the most important differences between Man and the animals is that Man was created with both earthly desires and with a conscience. Every person possesses desires that incite him to evil, along with a conscience that inspires him to avoid it. Alongside such pleasing attributes inspired by that conscience--love, sacrifice, compassion, humility, affection, honesty, loyalty and kindness--he also possesses destructive and undesirable tendencies, stemming from his earthly desires. Thanks to his conscience, however, the believer can distinguish between right and wrong and opt for what is morally right. Strong belief in and fear of God, faith in the hereafter, powerful fear of the endless torments of hell and a yearning for Paradise all keep the temptations of his earthly desires at bay. Therefore, he always behaves well towards people, is forgiving, responds to wickedness with good, assists those in need, and shows compassion, love, affection and tolerance.
Terrorists, on the other hand, listen to their earthly desire for violence instead of their consciences, and can easily turn to all forms of wickedness. They become loveless, aggressive people who easily hurt others without the slightest pang of conscience. Having no fear of God, they do not know the morality of religion, nor do they practice it. Nothing can stop them from committing crimes.
In restraining its citizens, society's prevailing rules can go only so far. Thanks to its law enforcement units, the state may be able to partially protect streets and public spaces, and--thanks to a powerful system of justice--may be able to take necessary means to ensure public order and ensure that the crime rate drops. But since it's impossible to keep watch on every individual, 24 hours a day, it's essential that peoples' consciences enter the equation at some stage. Someone who doesn't heed the voice of his conscience can easily turn to crime when on his own, or surrounded by people of like mind. The result is a society of individuals who gladly lie when they feel it necessary, have no compunction against enjoying unfair profits, and feel no qualms about oppressing and exploiting the weak. In a society that has lost all spiritual values and has no fear of God, purely physical measures are clearly not going to solve every problem. The morality of religion, on the other hand, commands a person to avoid evil deeds, even when on his own and when he knows that nobody in his community will ever punish him for his misdeeds. The person who knows that God will call him to account for his every deed, his every decision and his every word--and will reward him for them accordingly in the hereafter--will always avoid evil.
Terrorist organizations can't possibly have any place in a society whose people avoid evil of their own free will. Where religion's morality prevails, problems that give rise to organizations supporting the use of violence will disappear naturally. If the whole society possesses superior virtues like honesty, sacrifice, love and justice, there can be no place for such things as poverty, unequal distribution of income, injustice, the oppression of the weak, or limitations on freedoms. On the contrary, a social order will emerge that meets the wants of the needy; where the wealthy protect the poor and the strong, the weak; where everyone can enjoy the very best health care, education, and transport systems. There, tolerance and understanding will dominate the relationships between different ethnic groups, religions and cultures.
For these reasons, proper morality is the key to solving so many social problems. The source of that key, in turn, is the Qur'an, which God has revealed as a guide for mankind.