The Sims Edit
When on vacation, a Sim can rent a Metal Detector from Rental Shack Zack and go looking for buried treasure. Once the Sim stops looking for treasure, the metal detector returns to the shack and must be rented again if the player wants that Sim to keep digging. More often than not, the Sim will find small amounts of money that was presumably lost by other vacationers. However, Sims may find souvenirs while looking for treasure. If they're lucky, they may even find a bit of treasure. Of course, they may also find an old boot or two.
With The Sims: Unleashed, a bored dog may dig holes. Since vacationing families take their pets with them, there's a slight chance that a dog will dig something up while on Vacation Island, but it's unlikely.
The Sims 2 Edit
Digging was added in The Sims 2: Bon Voyage, and can yield unexpected treasures, maps to secret lots, rocks, bones, or other objects. Sims can dig on any uncovered terrain anywhere — including dorm, hotel, community, and home lots. Objects that have been dug up will be added to the Sim's inventory, and can be sold for their current value; since Sims dig them up for free, this can be a way for Sims to make money.
There is a random chance that Sims will burst the water main while digging. If this happens, the Sim will run around and panic while the busted water main creates puddles and lowers the environment score. The only way to fix the busted main is to have a Sim fill the hole in. If the puddles are left unmopped, they will eventually spawn weeds.
The Sims 3 Edit
Digging returned in The Sims 3: World Adventures. A Sim with a shovel can dig at a dig site and use it to find gemstones, metals, and other Items. Digging also comes in Ambitions in the form of the miner, which a Sim can invent. The Digging Skill is a skill that can be obtained by dogs in The Sims 3: Pets. It is possible to take a class in the skill, or it can be taught by a Sim. At level 2 of digging, dogs will be able to "sniff out something", which gives their Sims the ability to dig there.