Is it safe to buy a 2nd hand digital camera?
It depends.
Where are you buying? From a reputable photo company, from an online auction, from a friend?
If you're buying from a reputable dealer, you're probably okay. Read all the terms to make sure you can return it if there are problems.
It's probably fine buying from a friend too. But if something went wrong with the camera say, a month later, would it impact your friendship? Hopefully not, but it's something to think about.
Another option is to buy a refurbished digital camera from the manufacturer. You'd save a bundle of money plus may have a 90 or more day warranty. Here's some information about buying a refurbished camera:
http://www.digicamhelp.com/buying-guide/checklist/reburbished.php