Let's take a look at the root פלל. It is appears both in the verb hitpalel התפלל - "prayed" and the adjective plili פלילי - "criminal". Is there any connection between the two?
Let's look at the latter sense first. The root פלל in this context originally meant "to judge", and we find this meaning a number of times in the Tanach (for example Shemot 21:22 and Shmuel I 2:25). From here developed the modern sense of criminal - someone (or something) that is judged.
Klein says that some scholars claim that this base originally meant "he cleft, split, decided" and is cognate with the Arabic falla - "he cut, broke". He points out that a similar sense development can be found both in the Hebrew root פסק which means both "split, divide" and "decide", and the English word "decide" itself, which derives from the Latin caedere, meaning "to cut".
What of the other meaning of פלל - "to pray"? Klein gives a few possible suggestions. One goes back to his derivation of the first meaning of פלל from "he cut", this meaning meant "he cut himself in worship." He says that a more probable explanation would connect this sense to a different root - נפל "to fall", and so it meant "to prostrate himself in prayer". However, his last suggestion connects the two meanings of "judge" and "pray", saying that the original meaning of this sense was "to invoke as a judge".
The noun form of this root - tefila תפילה - "prayer" and the associated tefilin תפילין (so called because they are worn in prayer - in the Torah they are called totafot) are easy derived from פלל. But why is the verb form hitpalel, in the reflexive, hitpael, form? That usually means something you do to yourself, such as hitlabsesh התלבש - "he dressed himself". However, prayer is directed to someone else - so why that form, and that form only?
There are a number of explanations for this as well.
Gesenius says that the hitpael form isn't always fully reflexive as I mentioned above, but can mean an "action less directly affecting the subject and describes it as performed with regard to or for oneself". So while we don't pray to ourselves, we pray for ourselves, and another example of this type of hitpael verb is hitnatzel התנצל - "apologize", where we apologize not to ourselves, but for ourselves.
This author suggests linking the meaning back to the earlier sense of "to judge" and gives this explanation (which fits the grammar in the previous suggestion): "to seek a judgment for oneself".
Rabbi Samson Rafael Hirsch, in his book Horeb, has a slightly different take on this, saying it means "to deliver an opinion about oneself, to judge oneself". While this explanation might be more on the level of drash, it may fit well with a suggestion in Ben Yehuda's dictionary, that the root פלל originally had a connotation of forming a covenant, and so the hitpael form reflects a sense of each side's responsibility towards the other.
I can't say which of any of these explanations is most convincing. However, it is important to distinguish between etymology and meaning. Just the meaning of words evolve over time, to reflect the understanding and usage of the speakers, so to does the concept of prayer itself. Our prayer today can include all of the various meaning described, and can therefore be a much richer experience.