The lawsuit argued the luncheon, scheduled for Thursday, would violate the constitutional separation of church and state because it appeared to be sponsored by the academy and because some faculty feared retribution if they didn't attend, even though the event is officially voluntary.
U.S. District Judge Christine Arguello dismissed the suit, saying neither associate professor of economics David Mullin nor the Military Religious Freedom Foundation had shown the prospect of retribution was real and imminent.
She said the academy had clearly stated to faculty, cadets and staff that the event was voluntary and no one faced reprisals for being a no-show.
She also said government lawyers had shown the chaplains, not academy commanders, were the sponsors, although she said there was "some lack of clarity" in the way the event's sponsorship was described.
She suggested the academy pay more attention to the details of such announcements in the future.
After Arguello announced her decision, Chaplain Dwayne Peoples told reporters he would emphasize at Thursday's lunch that the Community Center Chapel is the sponsor. He said he had planned to do that before the ruling.
"I want the credit," he joked. "We put it together," not the academy administration.
Darold Killmer, the attorney for Killmer and the foundation, said that was a victory.
"That was the goal of this case," he said. "We've been given assurances they will walk more carefully."
Killmer and Mikey Weinstein, founder and president of the Military Religious Freedom Foundation, both expressed disappointment that the judge ruled the plaintiffs had no legal standing to sue.
In her ruling, Arguello said Mullin's claims of potential retribution were "speculative and hypothetical" and said he testified that he hadn't suffered retribution when he skipped previous prayer luncheons.
In a telephone interview after the ruling, Mullin acknowledged he couldn't say with certainty that he would face retribution for not attending.
"I do make the assertion that I have been under scrutiny of my conduct overall, including my attendance at these events," he said.
Killmer asked Arguello to reconsider her ruling, calling it a legal error that would prohibit anyone from seeking a court's help if they feared retribution but had not actually suffered it.
Arguello interrupted, saying, "That was not my ruling, and if that's your argument, I'm not going to listen to it."
It was the last of several sharp exchanges between Killmer and the judge during the hearing, which lasted more than seven hours over two days. They sparred over the scope and relevance of Killmer's questions and over a government attorney's frequent objections.
"I'm being interrupted by groundless objections," Killmer told the judge at one point.
"I don't think they're groundless," she replied.
The government's lead attorney, Brad Rosenberg, said he couldn't comment and referred questions to a Justice Department spokesman in Washington. The spokesman didn't immediately return a call.