As encouraging and confidence-building as that truth is, some people might think prayer is a waste of time and energy. Because God's will cannot fail to be accomplished, and if He is in complete control of everything anyway, does that fact destroy our motivation to pray?
No, it doesn't. God has ordained the means as well as the end, and it is His design that the prayers of His people should be the means by which He is frequently moved to act. James wrote, "The effective, fervent prayer of a righteous man avails much" (James 5:16). God, who sovereignly decreed His judgment against Israel in the time of King Ahab, also ordained that the prayer of Elijah would be the effectual means through which the judgment was brought (James 5:17-18).
- from Lord, Teach Me to Pray, by John MacArthur