The problem of justice as one of God's attributes has had its own distinct history. Various schools of thought in Islam have held different views on the subject interpreting it in accordance with their own distinctive principles.
Some Sunnis who follow the views of the theologian Abu'l-Hasan Ash'ari do not believe in God's justice as a matter of faith and they deny that justice is accomplished by the divine acts.
In their view however God treats a certain person and whatever punishment or reward He gives him irrespective of what he might appear to deserve will represent justice and absolute good even though it might appear unjust when measured by human standards.
These Asharis thus distinguish God's attribute of justice from His acts and they therefore regard as just whatever can be attributed to God. If He rewards the virtuous and punishes the sinful this is justice but so would be the reverse; it would still be in the broad sphere of His justice.
Their claim that the very terms "justice" and "injustice" are meaningless when applied to God is no doubt intended to elevate God's most sacred essence to the position of the highest transcendence. But no thoughtful person will regard these superficial and inadequate notions as having anything to do with God's transcendence. In fact they involve a denial of order in the world of the principle of causality both in the general order of the world and in the conduct and deeds of individual men.
The followers of al-Ash'ari believe moreover that the bright lamp of the intellect is extinguished whenever it is confronted with the perceptions and problems of religion that it is unable to benefit man or light up his path.
This claim conforms neither to the teachings of the Quran nor to the content of the sunnah. The Quran considers disregard for the intellect to be a form of misguidance and repeatedly summons men to reflection and meditation in order to learn divine knowledge and religious beliefs. Those who fail to benefit from this bright lamp within them are compared to the animals. The Quran says: The worst of creatures in the sight of God are those persons who are deaf and dumb and do not reflect. (8:22)
The Prophet of Islam says: God has assigned two guides to man: one external to him the messengers of God and the other internal his own power of thought.
source : http://www.maaref-foundation.com