It is necessary to bear in mind that there are certain conditions for the acceptance of du‘aas. In the absence of these conditions, du‘aas may often be rejected. Among these conditions is the consumption of halaal food. When haraam is consumed, du‘aas are not accepted. Rasulullah (sallallahu ‘alaihi wasallam) said, “Many a greatly distressed person raises his hands to the heavens, praying and crying, ‘O Allah! O Allah!’ But his food is haraam, what he drinks is haraam and his clothes are of haraam. In such a case, how can his du‘aa be accepted?”
A story is related about a group of people in Kufah whose du‘aas would always be accepted. Whenever a (evil) ruler was placed over them, they would make du‘aa against him due to which he would soon be destroyed. When Hajjaaj, the oppressor, became the ruler there, he hosted a feast to which he specifically invited these people. After they had all eaten, he said, “I am now safe from the du‘aa of these people as haraam food has entered their stomachs.”
At this stage let us ponder over how much haraam is being consumed in these times when people are even trying to make permissible the earnings of interest money. We find people go so far as to think that bribery and what is obtained from it is permissible, while our traders very often, when dealing with people, deceive them. (Fazaail-e-A’amaal
Source: Ihyaauddeen.co.za