Whether or not a debtor in bankruptcy can discharge a traffic ticket is dependent on federal and state law, and the answer may be different depending on the Chapter the individual files.
The answer is clear for Chapter 7 cases and for a hardship discharge in a Chapter 13 case, NO. Traffic tickets may not be discharged in a Chapter 7 case or in the case of a hardship discharge in a Chapter 13 case because Bankruptcy Code Section 523(a)(7) provides that those cases do not discharge debts to the extent the debt is a fine or penalty payable to and for the benefit of a governmental unit, and is not compensation for actual pecuniary loss.
Whether or not a debtor can discharge a traffic ticket in a Chapter 13 case depends on how the particular state classifies the traffic violation. If the state considers the offense a crime then the debt will not be discharged pursuant to Bankruptcy Code Section 1328(a)(3) which makes criminal fines non-dischargeable. In California traffic violations are classified as either infractions, misdemeanors, or felonies. In California all three of these classifications are included in the definition of a crime. See California Penal Code Section 16.
In California debtors will not be able to discharge traffic tickets, but in a Chapter 13 case the debtor can provide for payment over time for the priority traffic fines.