Does the president of the United States have the power to edict laws to prevent the followers of a specific religion from entering the United States?
If Donald Trump is elected president, will he have the power to ban Muslims from entering the United States?
The president has the power to issue an executive order, which must either be supported by the Constitution or by some act of Congress. If a president were to apparently overstep his authority, someone would have to sue him and the Supreme Court would decide whether he did have that authority. For example, Truman thought that he had the power to nationalize steel mills, but Youngstown Sheet & Tube Co. v. Sawyer, 343 U.S. 579 determined otherwise. There have been few cases where courts have overturned an executive order.
Matters of immigration are not outside of the executive power of POTUS. Obama issued a dozen orders aimed at stopping deportation of illegal immigrants. The matter ended up in SCOTUS, which tersely declined to overturn the lower court ruling (that he didn't have that power). Congress can restate the law to clearly take away a power (assuming it is not a constitutional power, and immigration is not a constitutional power / duty). In this sense, the president can "write laws" the same way that various federal regulatory agencies can "write laws", or how courts can "write laws". The subject matter of such laws is limited, so while an act of Congress is limited only by the Constitution, executive-branch law has further underlying statutory limits. Only Congress can unilaterally pass a statute: the power to write law is available to pretty much all branches of government.
As for immigration statutes, 8 USC 1182 provides the general hook for such a presidential decree – the code would require major rewriting to clearly take away that power. It has to be remembered that Congress creates laws and cannot enforce them: the executive branch enforces them. Any law whatsoever restricting immigration therefore involves the president.
8 USC 1185 (a)(1) says:
(a) Restrictions and prohibitions Unless otherwise ordered by the President, it shall be unlawful—
(1) for any alien to depart from or enter or attempt to depart from or enter the United States except under such reasonable rules, regulations, and orders, and subject to such limitations and exceptions as the President may prescribe;
This means that the president can essentially keep any non-US citizen out of the country, including Muslims. More precisely, it means that anyone who is not a US citizen can enter the country only if allowed by the President. In practice, the president has delegated this authority to the Secretary of Homeland Security, and regulations have been promulgated so it's not necessary to consult with one of these people every time someone tries to cross the border.
In practice, though, the problem of identifying Muslims for exclusion will be a difficult one. It's also likely that an order barring Muslims from the country would be subject to numerous challenges in the courts. The outcome of any such challenges is difficult to predict.
The President does not have the power to simply call laws into being. They can propose laws to Congress, but they cannot specifically write a law and bypass the entire legislative process; this is the reason why the Founding Fathers wrote the government the way they did, so that one single person would be limited to their control. They can also write executive orders, but those are reviewed by, and enforced by, the judicial system. It would be easier for Congress to simply propose a bill and have it pass than for the President to try and force their will on the legislative branch.
In other words, the President could try to propose that Congress pass such a law, or they could try to order INS to change their policy to make it difficult/impossible for certain people to enter the United States, but either direction would require the cooperation of the legislative branch and/or the judicial branch in order to have any real effect. The President does have significant influence over the rest of the process, but not so much that they can actually guarantee they'll get anything done that's not supported by the will of the people (or, at least, the will of the elected officials that represent the people).
In reality, it is highly unlikely that Donald Trump would be successful in barring Muslim entry for any meaningful period of time, and even if he were successful, it would probably be well into his first term, or later, before such a controversial move could become finalized as law. He's simply saying what the mass media-controlled society wants to hear in order to get in to the office. It's highly unlikely that he would ever get a wall built, ban certain types of immigrants, or do any of the other wacky promises he's made.
Any ideology opposed to America and her laws, including her Constitution can legally be kept out of the us. The Immigration and Nationality Act that passed June 27, 1952 That act, which became Public Law 414, established both the law and the intent of Congress regarding the immigration of Aliens to the US and remains in effect today. From 8 USC § 1424(a):
[N]o person shall hereafter be naturalized as a citizen of the United States—
(1) who advocates or teaches, or who is a member of or affiliated with any organization that advocates or teaches, opposition to all organized government; or
(3) who, although not within any of the other provisions of this section, advocates … the establishment in the United States of a totalitarian dictatorship, or who is a member of or affiliated with any organization that advocates the economic, international, and governmental doctrines of world communism or the establishment in the United States of a totalitarian dictatorship, either through its own utterances or through any written or printed publications issued or published by or with the permission or consent of or under authority of such organizations or paid for by the funds of such organization;