Figuring out how the Court could overturn this is an interesting question. I don't THINK they'd be able to use the Fourteenth Amendment/equal protection for this case. The EP clause reads "nor deny to any person within its jurisdiction the equal protection of the laws." Are potential immigrants within the jurisdiction of the United States? I'm not really sure they are and precedent points to the answer being "no". Similarly, its hard to say the state is depriving someone of due process when they're not even within its jurisdiction, though a big DP fan like Kennedy might look there.
Do you think that could be overcome with a citizen plaintiff who, for example, is attempting to obtain entry and legal status for a foreign muslim spouse or adopt a foreign muslim child or sponsor a foreign muslim family member? The citizen would have a direct injury to a protected right, even though the ban is on the foreign person. And given that it is a reasonable assumption that family members are of the same religion, discrimination against only foreign muslims has an overwhelming discriminatory impact on the rights of domestic muslim citizens when compared to the rights of citizens of every other religion. That might mean a plurality opinion could narrow the ruling to only the specific visa program in question (family, H-1b, etc.), but I feel the Court would inevitably have to look at the 1st Amendment aspects of the law. And if there's a 1st Amendment analysis, I foresee death by strict scrutiny.