That is a question that plagues all Christians. Well I have an understanding (imagine that) and I would like to share it with you.
Let me use an analogy to explain how I view prayer.
Suppose that you are a three or four year old child and you want something. You know who has the power to give it to you, so you go ask your father. Now your father loves you and because he loves you he likes to hear you talk to him. He is not usually going to give you what you ask for, but if you are not asking for something you do not usually even pay any attention to him: you just go about your play.
Your father knows what is good for you and gives you things that you don’t even think about, such as meals, a place to live, clothes, etc. and he does not give you things that are bad for you, no matter how bad you want them.
Suppose your arm hurts and you ask your father to make it stop and suppose your father is a doctor and has access to morphine. Will he give it to you? Well, only if he thinks it is appropriate and it really doesn’t matter if you think you should have it.
I might also add that you father knows many things that at four years old you can not even understand. Let us say, just for the sake of clarity that your father is a nuclear scientist. There is no way you as a four year old you could understand your fathers work.
As you mature physically you begin to understand what and why your father took the actions that he did. You also begin to love your father and like to talk to him just to be talking to him.
As we mature spiritually we also begin to understand that everything that God has done for us has been for our good and not for evil, but it takes awhile. We, like the child, begin to talk to Him just because we like to.
I will be truthful to you (I always am). I pray to God for many things, but I don’t really want Him to do anything different than what is best for me, which is, I am sure, just what He is doing. If He is going to change something, then He already knew He was. It was, or is not because I asked. I like it that way. I don’t control God. If I did we would all be in trouble.