If the Husband and Wife have agreed to list and/or sell the house while their divorce is pending, then the court can issue an order for that to take place based on the agreement of the parties. That is the easy scenario.
Generally speaking, when there is a contested divorce which is not yet resolved and one person wants the house listed and sold the divorce court will not typically do so unless there is an overriding reason that doing so will preserve the equity in the home.
For example, if the house was in foreclosure before the divorce started or goes into foreclosure during the divorce, the court may grant an application for the listing and sale of the house before there is a settlement, equitable distribution or final decision of the court. The reason for doing so is that if the house has equity and the house is a marital asset in whole or part (regardless of title) then the court may determine that the best way for the parties to receive any monies for their home is to sell before the equity is significantly diminished or lost entirely due to the foreclosure process.
Some possible exceptions to the general rule are the following:
1. Often, if only one party is living in the house and the child is present as well, the court will be more hesitant to order the sale dependent upon the age of the child, the child's need to stay in the residence for education or deep social interaction purposes (for example the child is a junior or senior in high school).
2. If the child or parent in the house has special needs and the house has been adapted for that purpose, the court would likely consider this issue and the question of whether similar adaptations could be made elsewhere.
3. The income and resources of the parties and whether there are sufficient funds or earnings to pay the mortgage or to refinance or extend the mortgage to preserve equity as well as the balancing of the need for a parent and child to remain in the house.
4. If there is an existing court order directing a party to pay the "carrying charges" on the house and the order is not being followed and the court determines that the failure to pay is on purpose even though monies exist for payment, the person that is not paying will not be able to "benefit" from the sale to reduce monthly expenses at the cost of losing the residence for the other parent. So, if a party is directed to make the payments and instead "wastes" income/resources on significant others, continues to make retirement account contributions, seems to pay all other bills except what the court has directed, fails to provide financial disclosure and is generally viewed as non-cooperative, the court may use its discretion and not direct a sale even though there is a foreclosure pending and instead seek to compel compliance with the order.
Without a doubt this is a complicated area of matrimonial litigation and both sides will benefit from having experienced divorce attorneys so that their respective positions can be clearly argued and explained to the court. This is the best way to avoid significant financial and residential consequence while the divorce is still pending.