All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
It is permissible to visit the graves whether they are graves of pious people or else, as a way of admonition and reminder, and supplicate for the deceased Muslims. As regards putting flowers, then this is not permissible as this is an innovation and an imitation of non-Muslims, and it is wasting money.
The most aberrant act of all is to kiss and cover the graves of the pious people, and to bend down (bow) to them; all these acts are refutable innovations which may lead a person to Shirk [associating partners to Allaah], as he takes these graves as worshipped idols. Indeed, it is confirmed that the Prophet said: "O Allaah! Do not turn my grave into a worshipped idol." [Maalik]
For more benefit, please refer to Fataawa 90724, 85383, 85126, 83848 and 82393.
Allaah Knows best.