Apparently Hillary agreed to debate Bernie in California if Bernie agreed to an extra debate before the Iowa caucus, which he did. Hillary has now reneged on the agreement I suppose since she has the nomination at hand.
I suspect that Trump’s team told him he had something to lose, and nothing to win in that debate. If Sanders outperforms him, he takes a blow. If he hits Bernie hard, he is potentially angering Sanders supporters, many of whom are potentially willing to cast a ballot for him in November.