Red Xs mark the location of buried treasure you can dig up. One X will appear each day you log in around the same time you get the daily lottery message in the area around your house. Buried treasure can spawn behind trees if there's an empty hex. While players are the direct cause for spawning buried treasure, the treasure around your house is not "yours." Anyone can dig it up whenever they want. If you really care about always getting "your" treasure, be sure to look around when you get your lottery message. Having said that, it is very polite to ask if you see a buried treasure in someone else's garden.
During the Easter 2011 update, buried treasure was reskinned as easter eggs.
There were several egg colors and a slightly adjusted spawn system that allowed for additional eggs and currently has not been reverse engineered.
Most theories of this new spawn system postulate that additional eggs spawn in areas with higher plant density or several people visiting, but specifics have not been confirmed.