“What Momentum’s investors and clients and the taxpayers who help foot the bill for its operations do not know is that the management at the company’s New York-based warehouse fostered a work environment permeated with vile racism,” the complaint stated.

The former employees are represented by Michael J. Willemin of the Wigdor law firm in Manhattan.

One of the former Momentum workers, Shaddon Beswick, said in an interview that he was subjected to frequent use of the “N-word” and called “panel boy” as he lugged 50-pound solar panels up a 40-foot ladder to the roofs of two-story houses.

“It was just random racism,” said Mr. Beswick, who is an electrician. He said he put up with it for a while because he had a baby daughter and bills to pay. But when he noticed that white workers were getting better assignments while he was consistently given “grunt work,” he complained to his manager, he said.

The manager dismissed his complaints, telling him that there were “always three sides to a story: your side, his side and the truth,” Mr. Beswick recalled. A day after lodging one of these complaints, he said he was fired and told, “It just didn’t work out.”

Tevin Brown, one of the plaintiffs, said he started out at $15 an hour and never received a raise in his five months with Momentum. One day, a new white employee with no experience in solar installation told Mr. Brown that he was receiving $22 an hour.

Mr. Brown said he eventually told a foreman that he was tired of being called “boy” at work. He was abruptly shifted from that crew and, within weeks, was fired, he said. His replacement: the inexperienced white worker who was earning $7 an hour more, he said.

Another plaintiff, Garreth Murrell, said he left a job with Tesla and took a pay cut to join Momentum, believing that he would receive a raise after “I show them how I work.” Mr. Murrell was promoted to a foreman position, overseeing an all-black crew of installers, but he was “shamelessly paid less than his white counterparts,” according to the complaint.