Let's say that you have a house that you buy for $P$ dollars. You have a mortgage of $M$ dollars. There is a change in the price of housing of $r$ percent. Assuming no transaction costs, the home owner's equity, the value of the house after selling it and repaying the mortgage is then:
$$ \max[(1+r)\cdot P - M, 0]$$
because if the mortgage is worth more than the house they can default, and this option makes it so the household has equity of at least zero. There is a second reason a household might default, that they are unable to pay their mortgage. The first reason is called strategic default and the second non-strategic default. In good times, when $r$ is positive, the household has positive home equity and no reason for strategic default. If they are unable to make their mortgage payments (non-strategic default), they can sell their house. This allows them to pocket their home equity, protect their credit, and repay their loan.
In reality, there are complications. The lasting damage to credit scores of a default, the possibility of recourse on a mortgage, losses in house value from foreclosure, and transaction costs all complicate this picture some. But the general idea still holds. Rising house prices give households with cash flow problems the ability to sell their houses rather than default. So the strategic defaulters have no reason to default and the non-strategic defaulters can sell instead of default. This lowers default risk substantially.