Many people who are considering filing for bankruptcy worry about what will happen to their anticipated tax refund. The answer depends on when you received your tax refund-before or after filing for bankruptcy. Your tax refund is an asset that belongs to the bankruptcy estate meaning that the trustee can possibly take it and distribute it to your creditors.
If you received your tax refund before you filed for bankruptcy, you can keep it safe by spending it right away. However, you should be spending it on "necessaries" like your mortgage/rent, groceries, medical expenses, etc. You can even use the tax refund to fund your bankruptcy. It is not recommended that you use your tax refund to go out and buy luxury items, especially if you are having difficulty paying your debts.
If you receive your tax refund after you filed for bankruptcy, that refund is property of the bankruptcy estate and subject to the trustee's control. However, there is a way to protect your refund. You can use California's "Wild Card" exemption to protect your tax refund.