I'm expecting to get slaughtered by know-nothings for writing (below) that "All authorities agree that it is forbidden to pray to a dead person, while most authorities add that it's forbidden to ask a dead person to intervene on your behalf." so here's a preemptive post.
It's common, especially in Ellul for Jews to pray at graves. Why?
All agree that praying to the dead for direct assistance is forbidden, however, beyond that, there are two schools of thought on the subject. Some say we're not praying, but asking the dead to speak to God, as it were, on our behalf. According to this opinion, the dead are our messangers and advocates.
This view is considered 100 percent out of bounds by the Be'er Heitev (O.C. 581:17) among others (ie: Chayei Adam, Mateh Efrayim and Kitzur Shulchan Aruch), who says that addressing a dead person for any reason is a violation of "consulting the dead."
The final word on the subject of praying at graves is the Mishna Brurah (581:27): "We visit graves because a cemetery where tzaddikim are interred is a place where prayers are more readily answered. But one should not place his trust in the dead. He should just ask Hashem to have mercy on him in the merit of the tzaddikim who are interred here."
Update: What did I tell you?