Racial unrest was linked to World War I because of the fact that many African Americans migrated to the North during the war. They came to the North to escape the injustices that they experienced in the South and they came to get jobs in the factories that were producing materiel for the war effort.
When African Americans made it to the North, their presence upset the status quo. There came to be large black communities in cities such as Detroit that had not had much in the way of African Americans before. This influx led to a great deal of racial unrest in various parts of the North.
The Red Scare was a somewhat paranoid fear that Communists and Anarchists were at work to destroy the government of the United States. It is related to World War I only in that it closely followed the Bolshevik Revolution in Russia, and the fact that following the War, there was a tremendous eruption of nativism. It was during this time that Sacco and Vanzetti were executed for robbery and murder even though there was substantial doubt as to their guilt. Their Eastern European origins and political affiliations were enough to convict them. The Boston Police Strike was also an element, as it was commonly believed that labor unions were fronts for Bolsheviks. The prime mover behind the Red Scare was Attorney General A. Mitchell Palmer who used hyperbole, arrests and detentions based on flimsy evidence in his war against the "Reds."
Racial unrest came about because of the Great Migration. Many white Americans were fighting in the war, and a large number of blacks moved North for jobs. They were not well received, and typically lived in segregated neighborhoods. Their sudden presence in the North led to considerable racial unrest.