Prayer and fasting are often connected in scripture. You specifically see people praying and fasting when there is a deep sense of need and dependence on God to act in a certain circumstance.
Nehemiah 1:1-6a
In late autumn, in the month of Kislev, in the twentieth year of King Artaxerxes’ reign,[a] I was at the fortress of Susa. Hanani, one of my brothers, came to visit me with some other men who had just arrived from Judah. I asked them about the Jews who had returned there from captivity and about how things were going in Jerusalem. They said to me, “Things are not going well for those who returned to the province of Judah. They are in great trouble and disgrace. The wall of Jerusalem has been torn down, and the gates have been destroyed by fire.”
When I heard this, I sat down and wept. In fact, for days I mourned, fasted, and prayed to the God of heaven. Then I said,
“O Lord, God of heaven, the great and awesome God who keeps his covenant of unfailing love with those who love him and obey his commands, listen to my prayer! Look down and see me praying night and day.
