In Matthew 6, Jesus teaches us to pray “Let Your will (God’s will) be done on earth as it is in heaven.”
A great mystery is right here, why should we pray when God already knows what we need? God is ready to fulfill his will and purpose, but waits for His people to cooperate with Him in prayer. God will not move until somebody prays.
With the example of Elijah in 1 Kings 18, God wanted someone to show to the unbelieving world that He, the Lord is God. It took the obedience and prayers of Elijah to fulfill this. God could easily have shown the world who He is, but He, that is God, waits for a man on the earth to cooperate with Him. God loves to work with men in the fulfillment of his will and purpose.