Read up about the car type on forums dedicated to that type of car, to learn about typical problem areas. Then make sure those problem areas have been adressed.
A lot of people put stock in getting a pre-purchase inspection (PPI) done, but that will only tell you what's good or bad now, and the condition of the typical wear items (like brake pads, rotors, clutch, tires, etc). It won't tell you what might break 100-1000 miles down the road. Only people knowledgeable about the type of car you're looking at can tell you what might be very likely to break in the near future.
Then add up the costs of repairing replacing those possible problem areas (if they haven't ben recently dealt with either under warranty or by the PO) added to the purchase price, and see if you think it's worth it.
When I bought my 740iL, sight unseen, 6 states away, I got a carfax report (which really only tells owner history and any major stuff that has happend, like wrecks that had to be reported, etc), and I did research with the E38 boards on what to look out for. I determined that the price, plus the cost of repairing the common fault areas that had no record of being done, was worth it. Paid for the car, then drove up and picked it up. That was 3 years ago, and I've spent a mere $1k in repairs over that time period for a reliable daily driver, much of that $1k comprising of replacing known problem parts even though they hadn't failed yet.