The LORD is far from the wicked: but he heareth the prayer of the righteous.
Prayer is not a right. Prayer is a privilege, a blessed privilege. The LORD is not obligated to hear the prayer of any man, and He will reject the prayer of the wicked. But as He has promised, He will hear the prayer of the righteous. He will answer them tenderly, mightily, and speedily. This axiom was perfectly understood by the Jews (John 9:31).
The wicked are those continuing in sin, any sin, even one sin. They know they are sinning, but they do not care. They do not confess and forsake it. They ignore the warnings of God's Word, His minister, their whispering conscience, and the conviction of the Holy Spirit. They think they can get away with their sin. They do not think it important enough to forsake and repudiate. They hide it under a cloak of hypocrisy.
You can hide sin from your parents, your spouse, your children, your church, and your pastor. They will continue to treat you with the same kindness and affection as in the past. You can snow friends and family with hypocrisy, but you cannot snow the LORD.
The LORD sees the very thoughts and intents of each heart (Heb 4:12). There is nothing hid from His holy eyes (Heb 4:13). He perfectly sees and knows every sin of thought, word, and deed (Pr 15:3; Ps 139:1-12). And He does not overlook them. They grieve and offend Him, and unless they are confessed and forsaken, He will not hear your prayers. You are doomed to a life without His blessing, and He will severely chasten you.
The LORD is not far from the wicked in location and knowledge, for He fills heaven and earth, and no one can hide from Him (Jer 23:24). But He is far from helping them, comforting them, blessing them, and having fellowship with them. He is near at hand to see their wickedness, but He is far away from answering their prayers. And in the great Day of Judgment, He will tell them to depart from Him into eternal hell fire (Matt 7:23).
So offensive is sin against the holy God, especially when you know better, that your sacrifices become an abomination to him (Pr 15:8). When you rebel against the preaching of His Word, He counts your prayers an abomination (Pr 28:9). See the comments on 28:9. He despises your worship, when you are hiding unconfessed sin (Is 1:10-15; 58:1-11).
So great is this offence of rebellion against God that He will laugh and mock when you need Him (Pr 1:24-31). If you reject His conviction and instruction now, He will laugh at your calamity later! Reader, do not even dare to think you can take preaching lightly. Do not even dare to think you can keep your secret sins and God will be merciful.
Because of Saul's wickedness, the LORD left him (I Sam 16:14). And though he begged for mercy, the LORD had judged him and given the kingdom to David (I Sam 15:28-30). He was so desperate for his prayers to be heard that he went to the witch of Endor to conjure up Samuel, who condemned him further (I Sam 28:5-20)! But David was confident that even in hell God's presence would protect and bless him (Ps 139:7-10)!
David also sinned. He hid his sin and learned a painful lesson. He learned not to wallow in his sins. He wrote, "If I regard iniquity in my heart, the Lord will not hear me" (Ps 66:18). So he confessed his sin, and the Lord heard him (Ps 32:5-6). He wrote, "But verily God hath heard me; he hath attended to the voice of my prayer" (Ps 66:19).
Therefore, it is a great duty to examine your soul and life. The man after God's own heart examined himself often and thoroughly (Ps 19:12-14; 26:2; 139:23-24). Then you must confess, immediately and completely, whatever evil you find by the blessing of God's light and conviction (Pr 28:13; Job 33:26-28). He will faithfully forgive you (I John 1:9).
Conviction for sin is special mercy from God. It is the loving overtures of your heavenly Father calling you back to Him. When you feel conviction for sin, rejoice that God has not forsaken you forever, and run with that conviction to confess and forsake your sins. If you continue to rebel, He will turn in Fatherly anger and chasten you. Instead, He lovingly says to you, "Return unto me" (Is 44:22; Mal 3:7).
To those who humble themselves and live holy lives, the LORD is always present with deliverance and blessing (II Chron 16:9; Ps 34:15-17; 138:6; Jas 5:16; I Pet 3:12). Listen to the LORD, and believe His Word, "The LORD is nigh unto all them that call upon him, to all that call upon him in truth. He will fulfil the desire of them that fear him: he also will hear their cry, and will save them" (Ps 145:18-19).
Dear reader, you do not have to be perfect for God to hear your every prayer, but you do need to confess your failures. Consider Elijah, the wild man that he was. When reviewing the power of his prayers, the LORD comforts you by declaring that Elijah was a man subject to the same passions you face every day (James 5:16-18). Thank you, Lord!
The LORD heard every prayer of the Lord Jesus (John 11:42), for He always did those things that pleased God (John 8:29). In His deepest hour of need, though the cross was unavoidable, His Father sent an angel to strengthen Him (Luke 22:43). And the angel of the LORD encamps around you, and delivers you, when you fear Him (Ps 34:7). Glory!