I have often noted tokens left on tombstones and wondered at their meaning. Pebbles, toys, golf balls etc., but I wasn't certain of the meaning of the coins in the oyster shells at the graves of the Hunley submariners. Doing a little research, I discovered that it was particularly a custom to leave coins on military tombs. Some sites mentioned that different coins had different meanings. In an explanation on snopes.com a quarter meant that the visitor had been with the soldier when he died. Considering the Hunley sank in 1864, I don't believe that is the case here. If it is, this is a more interesting cemetery than even I knew!
Why are pennies put on a grave? Some people hold to the tradition of leaving something of yourself when visiting a grave. If nothing else, a coin from your pocket serves as a marker of your passage, and esteem for the departed. It also signifies to any that pass by that the grave was visited, and that the deceased is well loved and esteemed and has not been abandoned or forgotten. Coins are also an older form of leaving flowers, a practice prompted by the heavy Romanticism of the Victorian era.