So if you are offering your gift at the altar and there remember that your brother has something against you, leave your gift there before the altar and go. First be reconciled to your brother, and then come and offer your gift. -- Matthew 5:23-24 ESV
Before approaching our Father in prayer, it is important to make sure there is nothing in our own hearts that might hinder our prayers. Proverbs 28:9 says that the prayer of one who ignores God’s instructions is an abomination. We see this illustrated in Isaiah 58 where the people of Israel asked why God ignored their fasting and prayers. God answers by telling the people that they did wickedness, oppressing the poor and the stranger among them (read the chapter for the full answer). They did not follow after the teaching of their Father.
Rebellion, pride, and strife are all things that threaten to frustrate our efforts to communicate with God. That’s why our Savior instructs us to inspect our hearts before bringing our prayers to the altar. Are there any idols you are holding above God’s commandments? Cast them out. Is there tension or discord between you and a brother? Seek reconciliation. We cannot expect God to hear us unless we first hear Him.
If my people who are called by my name humble themselves, and pray and seek my face and turn from their wicked ways, then I will hear from heaven and will forgive their sin and heal their land. -- 2 Chronicles 7:14 ESV