Yes. When you file for bankruptcy you can claim certain assets i.e. life insurance as "exempt" and keep those assets. California gives debtors a choice between the state law exemptions found in Code of Civil Procedure section 703 and the exemptions in section 704.
Generally, unmatured life insurance policies with no cash surrender values (term-life insurance) are exempt without making a claim
Section 703 provides that the cash surrender value of unmatured life insurance contracts are exempt up to $11,800. Payments under a matured life insurance are exempt to the extent reasonably necessary for the support you and any of your dependents.
Section 704 provides that the cash surrender value of your unmatured life insurance policies are exempt in the amount of $11,475. Benefits from matured life insurance policies (including endowment and annuity policies) are exempt to the extent reasonably necessary for the support you, your spouse, and your dependents.