Judges in Hawaii and Maryland halted Mr. Trump’s latest effort after finding he likely engaged in religious discrimination when he sought to bar U.S. entry for people from six Muslim-majority nations, a move the White House says could help fight terrorism.