The only way to know online is to check if it's a foreclosure, auction or short sale. A lot of the times, "bank owned" also means it was foreclosed. Another indicator is how many times the house has been sold. Multiple sales is a red flag something is wrong.
If the reason is because of some problem wih the house itself, then there is no way to know unless you visit the premises or ask your realtor. Some states won't even let the history of the house be revealed. Sometimes, just googling the address will help. Maybe there was a meth lab next door.
It's also good to know that you can back out if the inspection finds something. So be sure to get a good one. Don't skimp on ten's of dollars what could cost you thousands.
Ghosts actually raise the prices.