The Know-Nothing Party (also known as the American Party) was formed because of nativism. Nativism is an ideology that holds that the "native" people of a given country are superior to others and that those others should be kept out of "their" country. In the United States in the 1840s, this meant that people of generally English descent felt superior to immigrants of German and Irish descent.
During the 1840s, huge numbers of immigrants had come to the US from Ireland and Germany. "Native" Americans felt threatened by these newcomers. They felt that the immigrants (especially the Irish Catholics) were a danger to American traditions and values. In an attempt to fight against the immigrants and their increasing presence in US, the Know-Nothing Party was formed. As the link below says, the party was made of people who
...feared the foreign influence of immigrants ... who were arriving in record numbers to the United States in the 1840s.