This can be a rather controversial topic, and many religions have their own views on things. I can only present my understanding of the Jewish view.
Prayer isn't there for G-D's benefit. Prayer isn't there to make G-D happy or anything like that. One way to look at it is that if us praying changes G-D in any way, then either "he" wasn't perfect before, and is perfect now, or "he" was perfect before, and isn't now. Clearly both of these are wrong. G-D is omnipotent and omniscient at all times.
The clue to the real meaning behind prayer in Judaism is to look at the hebrew word - l'hitpallel. The l'hit at the start of the word is interesting, as it makes this a reflexive verb - it's a verb that describes an action on oneself.
One prays to improve oneself. By reciting a prayer, or by saying a Bracha, we are making ourselves think about our relationship with G-D and hopefully bringing ourself closer to G-D. This is the aim of prayer in Judaism.