Generally speaking, state governments can't bar people from entering a state, or for that matter traveling within the state. Such prohibitions might normally violate the Commerce Clause, the Privileges and Immunities Clause of Article IV, the Privileges or Immunities Clause of the Fourteenth Amendment, or a substantive due process right to travel.

But the law has long recognized that a state faced with real danger of contagious disease can restrict these rights: A state "may exclude from its limits … persons afflicted by contagious or infectious diseases," Railroad Co. v. Husen (1877), and this extends to quarantines that aim at people who might be infected (or might get infected), not just to exclusion of people who have actually been infected, see, e.g., Compagnie Francaise v. La. State Bd. of Health (1902). Those cases both reflect longstanding American practice, and remain good law today. Edwards v. California (1939), which generally bars states from excluding migrants because they are poor and likely to become public charges, did not overrule those cases: As Justice Jackson's concurrence noted,

The right of the citizen to migrate from state to state … is not … an unlimited one. In addition to being subject to all constitutional limitations imposed by the federal government, such citizen is subject to some control by state governments. He may not, if a fugitive from justice, claim freedom to migrate unmolested, nor may he endanger others by carrying contagion about. These causes, and perhaps others that do not occur to me now, warrant any public authority in stopping a man where it finds him and arresting his progress across a state line quite as much as from place to place within the state.

Of course, this right cannot be enforced in a way that violates the Constitution: The government generally can't, for instance, quarantine Catholics but not Protestants. In particular, the right is subject to the Fourth Amendment prohibition on unreasonable searches and seizures.

But of course that Amendment forbids unreasonable searches and seizures. When there really is an epidemic, and people from outside a state seem to pose a higher risk than people within the state, I think that (for instance) stopping all cars at the border or all cars with out-of-state plates, and perhaps ordering them to quarantine themselves for some days if they are from outside the state, is likely to be seen as a reasonable seizure.

Nor would the seizure become unreasonable because of the absence of probable cause or a warrant. Warrants aren't required to stop or even search cars; and while stopping a car for law enforcement purposes would usually require at least individualized suspicion,

Out-of-state plates might indeed produce individualized suspicion (not proof, but that's not necessary at this stage) that the driver has recently been out of state.

The Court has recognized that these requirements may be relaxed when "special needs, beyond the normal need for law enforcement, make the warrant and probable-cause requirement impracticable"—and it seems to me that stopping cars to find out who needs to be quarantined, rather than who needs to be criminally prosecuted, is a classic example of such a special need.

To be sure, there is very little caselaw that deals specifically with the Fourth Amendment and communicable diseases. (Hickox v. Christie (D.N.J. 2016) seems to canvass what limited precedents there are.) But based on the general thrust of the cases—coupled with the fact that judges likely don't want to deny government officials the temporary tools they need to stave off likely tens of thousands (or more) deaths in this extraordinary time—I expect these sorts of restrictions are likely to be upheld.