There is something in our nature that drives us to pray. They say there are no atheists in a foxhole. We have a natural desire to appeal to a higher authority. I believe God created us with not just a desire, but a need to be in communion with Him.
But what is the real purpose of prayer? What does it accomplish? I think that we mostly have the whole thing wrong. Most people spend their prayer time by telling God what they need. Something He already knows, in fact He knows that we are almost always wrong, even about what we “need.”
Can we change God? It is pride that takes us into His presence with the goal of changing Him. We cannot change God (Numbers 23:19, Mal 3:6, Heb 1:10-12, Heb 13:8, James 1:17). I put a lot of references there because I believe that is so important, I even think it bears saying again. We cannot change God. The purpose of prayer is to change you.
Why do we talk to someone? I think deep down, there are really only two purposes; to express your will and to learn their perspective. God already knows your will. That leaves learning His perspective, and I believe that is the root of what prayer is all about. It is learning His perspective and will on your life.
I believe that God will often do what we ask, not because we have convinced Him, but because it is through His act that we are changed. We learn that He is faithful, loving and powerful. He is willing and able to care for us down to the tiniest detail that we can complain about.
You want to know God, talk to Him. Let Him change you, do not try to change Him.