It's all about risk-reward. Your risk is getting a camera that fails. Your reward is saving money. Like most financial transactions you have to be the judge of what risk you're willing to accept for what reward.
A few things to keep in mind to reduce the risk:
When buying used bring along a memory card and something to look at the photos on outside the camera. (Computer, tablet, etc.) Don't try to judge the camera image quality from the LCD display on the camera.
If you can, buy used from a friend, friend-of-a-friend or a reputable dealer. With friends they are much less likely to sell you something in worse condition than they say. And with a dealer of course you'll pay more, but have some assurance that their reputation is on the line for the quality of the camera.
If you're buying remote (ebay, other internet source) (which is most risky) get either a guarantee of condition or ask for a few days grace period to return it if it's not the condition you expected. Again, you'll likely have to pay more for this, but it reduces the risk.
Sometimes manufacturers sell refurbished cameras. These come with the least risk as they are guaranteed, to some extent, by the original manufacturer.