The Supreme Court has explicitly NOT applied the Lemon Test to review of consular decisions to issue visas. The requirements are only that the denial be grounded in statutory language and that there is no bad faith on the part of the consular officer.
In this thread, I asked a very similar question.
The answer (at least in the Second Circuit, courtesy of Eva Luna’s excellent cite of American Academy of Religion v. Napolitano, 573 F. 3d 115, 2nd Cir 2009) was that immigrants themselves have no constitutional right to a visa or standing to sue; they have no First Amendment rights that the visa denial can implicate under Lemon or any other test.
However, individuals within the United States have a First Amendment right to “hear, speak, and debate with” a visa applicant. This from the Supreme Court in Kleindienst v. Mandel, 408 U.S. 753 (1972). This makes the visa applicant a “symbolic plaintiff.” Id at 762.
So courts have the power of judicial review when a visa is denied and someone inside the country asserts that this denial affected their First Amendment rights.
However, the scope of this review is not the Lemon Test. The First Amendment creates standing for judicial inquiry, but does not extend the “excessive entanglement,” Lemon Test to visa decisions. Instead, the rule is that if the exclusion is “on the basis of a facially legitimate and bona fide reason,” then the courts will not further examine the exercise of that discretion. Specifically, the courts may not “test it by balancing its justification against the First Amendment interests of those who seek personal communication with the applicant.” See *Mandel[i/] at 770.
So, you may ask, what constitutes “facially legitimate?” What is a “bona fide” reason?
Answer: a reason is facially legitimate if it falls within a statutory category for exclusion. (Note: NOT a Presidential Executive Order). In Abourezk v. Reagan, 592 F.Supp. 880 (Dist DC 1984), the statute forbid entry to aliens that wish to “engage in activities which would be prejudicial to the public interest, or endanger the welfare, safety or security of the United States,” and the aliens in question were members of groups that were hostile to the United States.
And a bona fide reason is an absence of any allegation that the consular officer acted in bad faith.
So: a consular officer’s assurance that he or she “knows or has reason to believe” that the visa applicant has done something that fits in a statutory exclusion is a facially legitimate reason.