The Trump administration, in defending Trump's notorious anti-immigrant and anti-refugee executive order in the current emergency proceedings before the federal Court of Appeals for the Ninth Circuit, makes essentially two sorts of arguments. One type of argument goes to to the specific constitutional and statutory merits of the order. The government's brief thus suggests that the executive order doesn't engage in religious discrimination, doesn't violate due process, and so on. The other type of argument, though, goes to the more general claim that at least "those aliens [who] are outside the United States and have never been admitted to this country" can assert no constitutional rights in the first place. The brief quotes language in Landon v. Plasencia, 459 U.S. 21, 32 (1982) asserting that the Supreme court “has long held that an alien seeking initial admission to the United States requests a privilege and has no constitutional rights regarding his application.”
Let's assume for the sake of argument that this second type of argument is correct. Let's assume that refugees and other aliens who have never been admitted to this country have no individual rights under the Constitution. And let's assume that nobody now in the country (such as family members, potential employers, and so on) could assert rights on their behalf. That might dispose of constitutional arguments for due process, equal protection, and even free exercise of religion. But it would not -- could not -- negate arguments under the Establishment of Religion Clause of the First Amendment. The reason is that the Establishment Clause is not primarily a rights provision at all. It is a structural provision of the Constitution, resembling principles of federalism and separation of powers. It's point is not so much to protect individuals (the Free Exercise of Religion clause does that), but to protect the polity as a whole from any government effort to enmesh itself too deeply into religious affairs.
Imagine, for example, that Congress passed a law declaring Presbyterianism to be to the official religion of the United States, but also making clear that no person's legal rights, entitlements, or obligations would be affected by the declaration. Such a statute, even with that proviso, would constitute an unconstitutional establishment of religion.
Now imagine that Congress passed a law explicitly barring Buddhists from entering the country, but, just to be on the safe side, excluded from the ban "any person entitled under the Constitution to assert a claim to an individual right to enter the United States." The effect would be to allow admission to Buddhists who were, say, green-card holders, visa holders returning from a trip overseas, and so on, while still (for the sake of argument) excluding Buddhist aliens "seeking initial admission." That statute, even with the clever exception, would still violate the Establishment Clause by baldly discriminating on the basis of religion.
The religious discrimination in Trump's executive order is a bit more subtle. But it's also clear.
Of course, even Establishment Clause claims require a plaintiff with legal standing. But that need not be the alien denied admission.