You may need to sell your house in a divorce if a judge requires it, you're not eligible for the mortgage, or you can't afford it anymore.