Their decision stated the plaintiffs had a strong case that the executive order violated the constitutional right to due process.  It also noted freedom of religion concerns raised by the executive order when combined with the rhetoric about banning muslims which had been a centerpiece of the Trump campaign.  They cited relevant case law about not just the wording but the expressed intent having bearing on an executive order.  I would think that the supreme court could go either way on the religious freedom issue but the due process argument seems very strong.