Daniel 9:1313 As it is written in the Law of Moses, all this calamity has come upon us; yet we have not entreated the favor of the Lord our God, turning from our iniquities and gaining insight by your truth.
Prayer can only be accepted when joined with the desire to turn from sin to God.
Prov. 28:9
If one turns away his ear from hearing the law, even his prayer is an abomination.
Ps. 66:18
If I had cherished iniquity in my heart, the Lord would not have listened.
Will we never learn. If I am not serious in prayer, calling out to God for forgiveness, with a sincere desire to change, the prayers will not be accepted by God, because He knows the heart.
When we pray earnestly, sincerely, confessing sin, coming before God with a desire to change and a desire to become more like His Son, Jesus, the Christ, God, our Father hears, and God, the Holy Spirit will help us to live as God the Son.