Everyone has had that horrifying moment where, when flipping through menus on a digital camera or tablet, they've accidentally pressed the button labeled "Delete All." The good news is that SD cards (the default removable media for most phones and cameras) can use many of the venerable techniques for file recovery that old floppy disks did back in the 1990s.
Video of the Day
What Not to Do
First and foremost, once you've realized you've done a mass file deletion on an SD Card, remove the card from the device and don't write any data to it. The way file deletion works in most file systems, including the FAT file system used on SD cards, is to delete the first two characters of the file name, but leave the rest of the data intact until those sectors need to be re-used by something else.
Try Restoring Files From the Device
Some, but not all, devices have an undelete function – read through the manual for your device and see if the software included has this capability. If it does, use it to recover your data. This is particularly handy if you deleted your photos on Windows 8 or Mac OS X Mavericks, as those operating systems have built-in file recovery capabilities with the Recycle Bin and Trash.
Use a Third-Party Utility
There are several third-party utilities, like Pandora Recovery, EaseUS Free Data Recovery, and Easy File Undelete, that can recover your data (links in Resources). You'll need to install these on your Windows PC, and put the SD card into an SD card reader. Launch the utility, and point it at the SD card reader, then use the utility's "Search" or "Find Deleted Files" utility to recover the deleted files.
Accidental photo deletions are much less likely when your camera or tablet is connected to the Internet, and is linked to a picture sharing service, like Picasa or Google+. With these types of services, and they're becoming much more common, your camera will save photos to the online service in addition to the local storage, so that your photos are in two places rather than one.