In his commentary on the Synoptic Gospels, John Calvin discusses Jesus’ statement that the “Father knows what you need before you ask him” (Matt 6:8). Calvin addresses the question of why believers should pray if God already knows what we need. He suggests the following as at least a partial answer:
Believers do not pray, with the view of informing God about things unknown to him, or of exciting him to do his duty, or of urging him as though he were reluctant. On the contrary, they pray, in order that they may arouse themselves to seek him, that they may exercise their faith in meditating on his promises, that they may relieve themselves from their anxieties by pouring them into his bosom; in a word, that they may declare that from Him alone they hope and expect, both for themselves and for others, all good things (Calvin, commentary on Matt 6:8).
When praying, believers never tell God something he doesn’t already know. But God has chosen to use prayer as a means by which God’s people express their dependence upon their Father who knows all things and can actually do something about the most puzzling problems of life.