The Justice Department maintains it carried out the surveillance program for objective reasons -- not because those being watched were Muslims.
But it has invoked state secrets privilege in refusing to say what the alleged reasons were and urged the courts to reject the case.
A district court in California dismissed the plaintiffs' claim, accepting the FBI argument that state secrets risked being revealed.
But the US Ninth Circuit Court of Appeals disagreed, saying the lower court should have held closed-door hearings to evaluate any secret evidence.
The FBI appealed that decision, and the US high court agreed to hear the case.
It will decide whether a district court can consider classified evidence in determining whether secret government surveillance is lawful.
According to the plaintiffs, the FBI sent a confidential informant with a prior criminal history to several mosques in Orange County in 2006 and 2007, ordering the man to pose as a convert and gather information.
The ACLU, the civil rights group representing the plaintiffs, said the informant secretly recorded prayer groups and made videos in mosques, homes and businesses.
ACLU lawyer Ahilan Arulanantham said the informant "started, again at his FBI handlers' behalf, to try to incite violence, but he scared a bunch of people, when he was talking about things like bombing, Jihad and the war in Iraq and Afghanistan (and) they reported him to the FBI."
The imam and his two congregants filed a complaint against the FBI for spying on them in violation of federal law and their constitutional rights.
'Should be a way'
Several of the Supreme Court justices appeared to be sympathetic to the government's case on Monday.
"Dealing with some super secret information in district court and district courthouses around the country would create an incredible security problem," said Justice Samuel Alito, a conservative. "Most district courts don't have the facilities to deal with information of that sensitivity."
"It's not the kind of information you want floating around, even in the White House," said Justice Brett Kavanaugh.
Others appeared wary of giving carte blanche to the government.
"I must say, on the face of the complaint, that the plaintiffs might be able to prove without your information that... they've been unlawfully surveilled," said justice Sonia Sotomayor, a liberal.
Justice Stephen Breyer, a liberal, said there "should be a way to look at the information for the court and decide what to do."
The court is expected to announce its decision by June 2022.