First, you may want to have an independent mechanic look at the car. Second, you should get a vehicle history report so that you know exactly what the problems were. Click here for Experian or Carfax. They each charge $15 for an instant report.
The vehicle check can be done free to a degree up to the point of an unverified report that states if the vehicle has been salvaged. That typically means the insurance company paid off the car as a total wreck. These cars will typically have a "reconstructed" title stating they were repaired and inspected. If that is the case, and you are not getting a huge discount, don't touch it.
For all other accident cases, it is more work for you. You have to take it to a body shop and have it inspected, as stated above. But most often it is not serious. It comes down to the price of the car. All things being equal, buy one that has not been in an accident. But a discount for a bent bumper or creased door panel is hardly worth passing up if nothing else is wrong, and the check should show what repairs were done and how extensive they were.
Finally, if the person lies, even a smidgen, don't touch the thing. I have had two cases in which I specifically asked if the car had been in an accident. One person said no and the other said that the tail light and bumper had to be replaced and that was all. Both cars, as it turns out, had been salvaged, and the seller lied about it hoping I would not check. If they are lying, and you catch them, that isn't all they are lying about. Walk away.
Ultimately, the fact that the car you want to buy has been in an accident should give first clue. Even if you had the car inspected, keep in mind, the car may have hidden damages due to the accident. Last but not least, most of the times when you buy an used car you buy it, AS IS. I would not do it.
if the carfax is "unclean" you want to see if the airbags were deployed or if the vehicle was towed. those two could indicate frame damage.