If we have sin in our hearts he will not hear our prayers: "If I regard iniquity in my heart, the Lord will not hear me." Psalm 66:18
If our motive is wrong he will not hear: "Ye ask, and receive not, because ye ask amiss, that ye may consume it upon your lusts." James 4:3
If we do not have faith: "But let him ask in faith, nothing wavering...For let not that man think that he shall receive any thing of the Lord." James 1:6-7.
Wrong relationships: "Likewise, ye husbands, dwell with them according to knowledge, giving honour unto the wife, as unto the weaker vessel, and as being heirs together of the grace of life; that your prayers be not hindered." 1 Peter 3:7.
Some prayers can actually 'become sin:' "When he shall be judged, let him be condemned: and let his prayer become sin." Psalm 109:7. When a person is deliberately disobedient and then attempts to ask God for blessing or direction, his prayer becomes presumptuous. God hates such hypocrisy and will not hear the prayer.
Of course, no Christian is sinless. He expects us to search his Word to "see if there be any wicked way in me" (Psalm 139:24), and then to confess and give up any sin that is revealed and known. "If we confess our sins, he is faithful and just to forgive us our sins, and to cleanse us from all unrighteousness." 1 John 1:9
When we are obedient to God's Word he will hear our prayers, because "the effectual fervent prayer of a righteous man availeth much." James 5:16
Sometimes his answer is delayed, but is 'being processed.' Daniel prayed for three weeks before his prayer was answered, but the prayer had been heard and the answer set in motion the very moment he began. In such a case the believer needs to keep praying in faith, because "men ought always to pray, and not to faint." Luke 18:1.
In some cases the request will not be answered because it is not God's will. Even Christ himself prayed, "Not my will, but thine, be done." His humanity was dreading the cross, and he agonized over it, but nevertheless he obeyed.
Prayer can seem a little complicated at times. I think it helps to remember that our relationship with God can be very similar to our relationships with our families right here on earth. The older I get, the more I see the similarity between my relationship with God, and my relationships with children, family and others. God, after all, is a person with emotions and feelings, anger and pleasure - and he made us like himself, in his image. We are his family, and we grow to know him better the longer we know him. He, however, knows us better than we can ever know ourselves.
Tell him everything. Everything. Go to him in your anger, in your pleasure, in your confusion or frustration, in your joy and happiness. Praise him, thank him, complain to him, cry, laugh, ask. And listen and obey. All of that is what prayer is.
Royal Heir