You can't directly turn a grave into a ghost in The Sims 3, but there's a related feature you might enjoy. At night, the ghost of the Sim buried in that grave will sometimes appear and float around the lot. So while you can't create a ghost on command, you may be treated to a spooky nighttime visit. Happy Simming!