Refunds of federal income taxes are never taxable because the taxes were not deductible. Refunds of state income taxes may or may not be deductible. It depends on whether the taxpayer itemized deductions and whether the taxes that are refunded produced a tax benefit on the earlier return. Those who claim the standard deduction are never taxed on refunds of state income taxes; those who itemize may or may not have taxable income from the refund.
When debts are cancelled in bankruptcy cases, the cancelled amount is excluded from gross income. Tax attributes are certain losses, credits, and property basis that must be reduced to the extent of the exclusion.