For the average individual debtor, receiving a discharge in bankruptcy has no tax consequences. The Internal Revenue Code §108 excludes the discharge of debt in bankruptcy from its definition of cancellation of debt income. Outside of bankruptcy, cancellation of debt may be treated as if it were income for tax purposes.
Get good tax advice before venturing into bankruptcy if your tax situation is complex.