All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
First of all, you are wrong for saying that Allaah does not accept our supplication, as you cannot authoritatively assert this; because accepting the supplication does not necessarily mean that a person should be given exactly what he supplicated for. Rather, one’s supplication may be answered, or an affliction is driven away from him because of his supplication and this will be better for him than what he asked for, or that Allaah reserves the reward for him in the Hereafter as confirmed in a Hadeeth from the Prophet . For more benefit, please refer to Fataawa 85023 and 88296.
As regards Allaah discriminating between his creatures, then this is evident; however, Allaah does this out of knowledge and wisdom and not out of ignorance and injustice. There is absolutely perfect wisdom in Him doing so; Allaah Says (what means): {Look how We have favored [in provision] some of them over others. But the Hereafter is greater in degrees [of difference] and greater in distinction.} [Quran 17:21] Allaah also Says (what means): {…and have raised some of them above others in degrees [of rank] that they may make use of one another for service. But the mercy of your Lord is better than whatever they accumulate.} [Quran 43:32]
In fact, poverty may be for some people better than richness, and richness is better for some others, in the same way health is more beneficial for some, and it is reported in a Hadeeth Qudusi [even if there is a controversy about its authenticity] that “Among My Slaves there are those for whom nothing is better than richness, and if I were to impoverish them, they would be corrupted, and among My Slaves there are those for whom nothing is better than poverty, and if I were to make them rich, they would be corrupted. I manage (the affairs of) My Slaves, I am indeed the All-Aware of their circumstances.”
You should know that real happiness is not for a man to obtain some money and other temporary worldly pleasures. Rather, the real happiness is in faith and acts of good deeds; Allaah Says (what means): {Whoever does righteousness, whether male or female, while he is a believer— We will surely cause him to live a good life, and We will surely give them their reward [in the Hereafter] according to the best of what they used to do.}[Quran 16:97]
Finally, it should be noted that there are some etiquettes that must be observed when supplicating and there are some matters that prevent the supplication from being accepted; for more benefit in this regard, please refer to Fataawa 83421, 116593 and 92363.
Allaah Knows best.