It comes from indirectly the establishment clause of the 1st Amendment, which states, "Congress shall make no law respecting an establishment of religion". It comes directly from a letter from Thomas Jefferson to the Danbury Baptist Association, who were a minority church in Connecticut worried about a majority church petitioning the State Legislature and becoming an official State Religion. He wrote, "I contemplate with sovereign reverence that act of the whole American people which declared that their legislature should 'make no law respecting an establishment of religion, or prohibiting the free exercise thereof,' thus building a wall of separation between Church & State." It means, at a minimum, that the Federal (and since the 14th Amendment, State) Governments can never establish an official religion or promote one religion above another.