Rambam discusses the purpose of prayer in several places in Guide for the Perplexed. What emerges from these discussions is that the point of prayer is for man to realize that God is the master of the world and rewards and punishes man based on his deeds. With this realization man will naturally improve his behavior.
Guide for the Perplexed 3:36
Likewise the commandment to cry to God in time of trouble, "to blow an alarm with the trumpets" (Num. x. 9), belongs to this class. We are told to offer up prayers to God, in order to establish firmly the true principle that God takes notice of our ways, that He can make them successful if we worship Him, or disastrous if we disobey Him, that [success and failure] are not the result of chance or accident. In this sense we must understand the passage, "If ye walk with me by chance" (beḳeri, Lev. xxvi. 21); i.e., if I bring troubles upon you for punishment, and you consider them as mere accidents, I will again send you some of these accidents as you call them, but of a more serious and troublesome character. This is expressed in the words: "If ye walk with me by chance: then I will walk with you also in the fury of chance" (ibid. vers. 27, 28). For the belief of the people that their troubles are mere accidents causes them to continue in their evil principles and their wrong actions, and prevents them from abandoning their evil ways. Comp. "Thou hast stricken them, but they have not grieved" (Jer. v. 3). For this reason God commanded us to pray to Him, to entreat Him, and to cry before Him in time of trouble.
(Friedlander translation)
Guide for the Perplexed 3:44
THE precepts of the ninth class are those enumerated in the Section on Love. Their reason is obvious. The actions prescribed by them serve to remind us continually of God, and of our duty to fear and to love Him, to keep all His commandments, and to believe concerning God that which every religious person must believe. This class includes the laws of Prayer, Reading of Shema, Grace, and duties connected with these, Blessing of the priests, Tefillin, Mezuzah, Ẓiẓit, acquiring a scroll of the Law, and reading in it at certain times. The performance of all these precepts inculcates into our heart useful lessons. All this is clear, and a further explanation is superfluous, as being a mere repetition and nothing else.
(Friedlander translation)
Guide for the Perplexed 3:51
We must bear in mind that all such religious acts as reading the Law, praying, and the performance of other precepts, serve exclusively as the means of causing us to occupy and fill our mind with the precepts of God, and free it from worldly business; for we are thus, as it were, in communication with God, and undisturbed by any other thing. If we, however, pray with the motion of our lips, and our face toward the wall, but at the same time think of our business; if we read the Law with our tongue, whilst our heart is occupied with the building of our house, and we do not think of what we are reading; if we perform the commandments only with our limbs, we are like those who are engaged in digging in the ground, or hewing wood in the forest, without reflecting on the nature of those acts, or by whom they are commanded, or what is their object. We must not imagine that [in this way] we attain the highest perfection; on the contrary, we are then like those in reference to whom Scripture says, "Thou art near in their mouth, and far from their reins" (Jer. xii. 2).
(Friedlander translation)
A more radical understanding of prayer, based on Maimonidean thought, is offered by R. Joseph Ibn Kaspi. In Gevia Kesef Chapter Six he writes:
For this reason Moses in the Torah told us to offer sacrifices, even though in truth they are an abomination. This, however, is something that it is not proper for the masses to know, (for sacrifices) are necessary to maintain a community. This is especially (necessary) when the opinion of the masses is that sacrifice is most desired by the Lord. Under no circumstances, however, should sacrifices be offered to the heavenly spheres, but only to the Lord. The same is true of prayer, for even though it is superior to sacrifice, as Maimonides has hinted, nonetheless when we make assembly halls, a Temple, or synagogues, these, like sacrifices, are not necessary in truth.
(Herring translation, p. 159)
Here he apparently extends the Maimonidean idea that sacrifices are a concession to man's unsophisticated understanding of worship to include prayer as well. Thus, according to this, it would seem that there is in fact not an intrinsic purpose of prayer.
Rambam himself touches upon this in Guide for the Perplexed 3:32 but it is sufficiently vague so as to neither outright support or refute Ibn Kaspi's argument:
But the custom which was in those days general among all men, and the general mode of worship in which the Israelites were brought up, consisted in sacrificing animals in those temples which contained certain images, to bow down to those images, and to bum incense before them; religious and ascetic persons were in those days the persons that were devoted to the service in the temples erected to the stars, as has been explained by us. It was in accordance with the wisdom and plan of God, as displayed in the whole Creation, that He did not command us to give up and to discontinue all these manners of service; for to obey such a commandment it would have been contrary to the nature of man, who generally cleaves to that to which he is used; it would in those days have made the same impression as a prophet would make at present if he called us to the service of God and told us in His name, that we should not pray to Him, not fast, not seek His help in time of trouble; that we should serve Him in thought, and not by any action.
(Friedlander translation)