Prayer and fasting are tied together at places throughout the Old and New Testaments, but no specific connection is explained nor are the practices commanded together. In fact, while fasting is certainly seen as a positive practice, Christians are not explicitly commanded to fast.
Are prayer and fasting connected?
In the Old Testament, prayer and fasting usually happened when the people of God were in a jam—they needed protection or deliverance. Nehemiah prayed and fasted in response to Jerusalem falling into enemy hands (Nehemiah 1). Daniel's pleas to God for mercy upon the Hebrews were also accompanied by fasting (Daniel 9:3). David prayed and fasted for God's mercy upon his ill child (2 Samuel 12:16, 21–22). Esther asked the entire Jewish population to fast for her as she risked her life to plead with the king for deliverance (Esther 4:16).
In the New Testament, Anna is introduced as a prophetess who worshipped, fasted, and prayed (Luke 2:37). In Anna's life, fasting was integrated with her prayer and worship. She saw Jesus as an 8-day-old and declared Him the Savior. After Jesus' baptism, He was led by the Spirit into the wilderness to be tempted by Satan. Jesus was there for forty days and fasted during this time (Matthew 4:1–11; Luke 4:1–13). When Saul and Barnabas were set apart on a missionary journey from Antioch, the church there prayed and fasted then sent them on (Acts 13:1–3). In the life of the church at Antioch, the Christians, through prayer and fasting, sought the guidance of Holy Spirit, and then God's protection and blessing.
Jesus may have told His disciples they were unable to exorcise a demon from a boy because they failed to pray and fast (Matthew 17:14–20; Mark 9:14–29). Some manuscripts include Matthew 17:21 or an extra phrase in Mark 9:29 that have Jesus telling the disciples this type of demon "cannot be driven out by anything but prayer and fasting." Jesus appears to be instructing His disciples that there is a stronger expression of faith, and power, when a Christian prays and fasts.
When we fast, we temporarily give up the good gifts of food and drink to enable uninterrupted time with God. Fasting is a way to re-focus our priorities and remind ourselves that our dependence is on God alone. Jesus told people that when they fasted it wasn't to be about self-righteousness or appearing holy to others, but to be seen "… by your Father who is in secret. And your Father who sees in secret will reward you" (Matthew 6:18; Matthew 6:16–18). Fasting when we pray seems to be a way to intensify our focus on God in our prayers. Fasting is a tangible symbol of dependence and reliance on God in faith.
It is important to note that, though fasting helps to concentrate our prayers, there is nothing in the Bible that indicates that it garners more attention or endearment from God. Fasting is not a means by which we manipulate God or put Him in our debt. Rather, it is a physical action we can do to help submit our hearts to God and come before Him in humility in prayer. Whether we are fasting or not, our "confidence to enter the holy places [is] by the blood of Jesus" (Hebrews 10:19). Prayer and fasting should be done with joy and gratitude to a God who loves us, not as a burden or legalistic obligation.
Why pray? What is the purpose of prayer?
What types of prayer are mentioned in the Bible?
What does the Bible say about Christian fasting?
What types of fasting does the Bible talk about?
What is the importance of daily prayer in the life of a Christian?
Truth about Prayer