Buying a salvage/rebuild titled car is a complete dice roll.
The most important thing you need to understand about doing it is not whether they will drive well and look good. Most basic craftsmen can find and fix theses issue - the question is god forbid if you are in a crash WILL THE CAR HOLD UP AND PROTECT YOU!
Modern cars, beneath the surface, are complexly engineered crash structure designed to take one major impact - absorb all the energy - and then essentially be disposed of.
By design, the are made to self sacrifice themselves to keep you alive and unharmed.
So, first, you have to know exactly what happened to it previously and why it was written off. Picture will help you assess the exact kind of damage it incurred and whether this was a financial write off (repair value exceed 75% of book value) or was it catrosphic damage where the major crash structures were damaged to the point that the insurance company WILL NOT allow it to be rebuilt for fear of futher liability.
The latter one is the one you really want to be cautious of.
Next step is to try to investigate whomever did the repairs and that they are absolute craftsmen, know how to properly rebuild a car, and didn't cut any corners to save money because crash damage is not just about he sheet metal and glass.
There are many substructures, electrical, and engine/transmission components that could have been damaged in the crash as well.
If you find out that the shop who did the work does a lot of work for a car dealer or that they're certified by certain manufacturers, this is a very good sign that they're credible and know what they're doing.
You can roll the dice a little bit with fresh water flood damage, (i.e. the car rolled into a pond or lake) but make sure the carpeting was removed, body dried and all electrical harnesses and wires dried fully or replaced.
UNDER NO CIRCUMSTANCES BUY A SALT WATER FLOOD DAMAGED VEHICLE OR A CAR THAT WAS "HALVED"!
A lot of those Katrina / Mississippi cars are still on the market and floating around. They should have been immediately crushed and destroyed but unscrupulous individuals are selling them.
Additionally, shady repair men will take two salvaged cars - one that was a front end total, the other a rear end total - halve them and then reweld the two good halves together. This creates a major structural integrity issues and the car will never perform as the designers intended in the event of another accident.