Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof; or abridging the freedom of speech, or of the press; or the right of the people peaceably to assemble, and to petition the government for a redress of grievances.
The immigration moratorium on seven Near East countries is not only not a muslim ban, it's also not unconstitutional. The Bill of Rights was meant to protect WE THE PEOPlE from despotic government, not foreigners. The logic is that since the U.S. was founded as a religiously diverse country, the government should not impose a particular religion on us or subsidize a particular religion. Providing federal grants to catholic schools is a clear violation of the establishment clause. The state of Texas funding faith initiatives is also a violation of the establishment clause. Temporarily banning citizens from a handful of muslim countries is not a violation of the establishment clause because they aren't U.S. citizens. It is not possible to have constitutional rights if you are not a U.S. citizen.
Here is a vlogger (Roaming Millennial) who I think does an excellent job explaining why the U.S. cannot accept immigrants and refugees from unstable, war torn countries.