Largely a Jewish tradition... one Rabbi explains "Unlike people from other religions, Jews do not typically place flowers at gravesites. Instead, they often place stones on the grave or tombstone. The origin of the custom is uncertain, though it may relate to ancient times when a pile of stones was used as a marker. The most common explanation is that placing stones is a symbolic act that indicates someone has come to visit and the deceased has not been forgotten".
A Jewish friend of mine told me that at Passover, the Angel of Death flew over the graves of Jews and could tell instantly by the number of stones how respected the deceased was.