WASHINGTON—The Supreme Court on Tuesday said it would consider whether the Constitution bars states from requiring government employees to contribute to collective-bargaining costs, casting a cloud over the strength of public-sector unions.

The lawsuit, brought by the Christian Educators Association International and 10 California public-school teachers who object to paying union fees, seeks to overrule a 1977 precedent that allows government entities to require public employees to shoulder their fair share of the costs for...