1. The American public and its courts are not privy to the US intelligence services info on spying and terrorist activities from the seven banned countries. The POTUS and the Security Council have access to various sources and have issued a ban in an effort to finally do something to deter terrorism. There has been no effective method to do this (other than militarily) by any country that has experienced, or is threatened by terrorism.

2. There is no US law (that I know of) that states how many visas must be issued in a given time period by an American embassy in a foreign country. The US State Department (or Secretary of State) could issue an edict to its ambassadors to limit the issuing of visas to a few per month. This would effectively comply with the federal appeals court ruling and slow the volume of travelers to and from the "banned" countries.

3. Under the US constitution, when does a foreigner have more rights than the security of a US citizen?