Attorney General Kamala Harris' office filed the lawsuit on Tuesday in San Francisco Superior Court.
The suit claims the retailers and candy makers "knowingly and intentionally" exposed consumers to lead in violation of Proposition 65, which requires businesses to issue warnings about even minute amounts of chemicals deemed harmful by the state. The suit says laboratory tests verified lead in the products.
If found true, the candy makers and retailers could be fined up to $2,500 per day for each violation.
Whole Foods Market California Inc. and Trader Joe's Co. did not immediately return calls for comment.
MORE HBJ HEADLINES
San Juan Salsa Co. to expand into new digs in Arlington New poll shows strong support for paid family leave programs 9:10 a.m. Fewer people sought jobless benefits last week Budweiser producer fined over alleged violations in Seattle 9:08 a.m. Poll: Two-thirds in U.S. would struggle to cover $1,000 crisis Briefs: Camano Island Roasters opens new offices