What the constitution says on the subject would be in the First Amendment: Amendment I 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. http://billofrights.org
The law Congress has actually made is: 8 US Code 1182 section (f) which reads:
(f) Suspension of entry or imposition of restrictions by President Whenever the President finds that the entry of any aliens or of any class of aliens into the United States would be detrimental to the interests of the United States, he may by proclamation, and for such period as he shall deem necessary, suspend the entry of all aliens or any class of aliens as immigrants or nonimmigrants, or impose on the entry of aliens any restrictions he may deem to be appropriate. Whenever the Attorney General finds that a commercial airline has failed to comply with regulations of the Attorney General relating to requirements of airlines for the detection of fraudulent documents used by passengers traveling to the United States (including the training of personnel in such detection), the Attorney General may suspend the entry of some or all aliens transported to the United States by such airline. http://www.law.cornell.edu/uscode/text/8/1182
This doesn't seem to be a law respecting an establishment of religion, thus disallowed by the First Amendment. And its use by the President to exclude Muslims wouldn't make it so. In World War 2 citizens of enemy nations were denied entry. Jimmy Carter denied Iranians entry. Also various Supreme Court decisions have established the principle that the Constitution is not a suicide pact. Muslims do pose a danger. Moderate Muslims admit that they can't tell the dangerous ones, and the government agencies charged with vetting immigrants have all said they can't either. A Presidential decision that admitting them would be detrimental to the interests of the United States would not be unreasonable. Also, we are talking here of non-citizens and residents. It isn't clear why they have any right at all under the first amendment. There are Supreme Court precedents supporting the lack of constitutional rights of foreigners as well.
The President takes an oath to preserve and protect the constitution. That's arguably his first duty. Islam is arguably an ideology that is at war with the constitution. If enough Muslims move here or they convert enough Americans, they will likely subvert the constitution.