Ezra 8 · a question people ask
Does fasting make God answer?
Ezra says, "So we fasted and begged our God for this, and he granted our request" (8:23). The ground he gives is what they had said of God: "The hand of our God is on all those who seek him, for good" (8:22). The fast was "that we might humble ourselves before our God" (8:21). Elsewhere the Bible tells of people who fasted and complained that God didn't see: "‘Why have we fasted,’ they say, ‘and you don’t see?’" (Isaiah 58:3), and the reply there is about the way they fasted (Isaiah 58:3-6). Jesus warned against fasting like the hypocrites, "that they may be seen by men" (Matthew 6:16), and told those who fast, "your Father, who sees in secret, will reward you" (Matthew 6:18). Ezra 8 tells of one fast and how it was answered. It doesn't say that the fast made God answer, or that every fast will be answered the same way.
The verses
“Then I proclaimed a fast there at the river Ahava, that we might humble ourselves before our God, to seek from him a straight way for us, for our little ones, and for all our possessions. For I was ashamed to ask of the king a band of soldiers and horsemen to help us against the enemy on the way, because we had spoken to the king, saying, “The hand of our God is on all those who seek him, for good; but his power and his wrath is against all those who forsake him.” So we fasted and begged our God for this, and he granted our request.”
““Moreover when you fast, don’t be like the hypocrites, with sad faces. For they disfigure their faces that they may be seen by men to be fasting. Most certainly I tell you, they have received their reward. But you, when you fast, anoint your head and wash your face, so that you are not seen by men to be fasting, but by your Father who is in secret; and your Father, who sees in secret, will reward you.”