" Let’s lay out some other constitutional basics regarding the power to regulate immigration and naturalization. Article I, Section 8 of the Constitution grants Congress the power to establish a “uniform Rule of Naturalization,” which means that states can’t grant citizenship. Early on, the Supreme Court wrestled with whether this means that only Congress can deny people admission into the United States or remove noncitizens. Starting in 1889, the court made a few pronouncements on this topic that still apply today. First, it held that the admission of aliens is not a right but a privilege, and that the United States can prescribe the terms of admission. Second, it concluded that “[t]he exclusion of aliens is a fundamental act of sovereignty . . . inherent in the executive power to control the foreign affairs of the nation,” so it belongs to the president. Third, and a bit weirdly, the court reasoned that when Congress legislates procedures regarding who gets to come into the country, it isn’t just legislating—it’s implementing an inherent executive power. Fourth, it held that courts can’t review decisions to exclude aliens unless Congress specifically says they can—also weird, because Article III of the Constitution gives federal courts the power to hear “cases. "
― , How to Read the Constitution--and Why