Nationalism affected Europe during the 19th century by making Europeans feel superior to other countries and governments, which led to the unification of both Germany and Italy, with Russia moving towards modernization and with France moving towards liberalism. This sense of superiority led to a stronger sense of unity between the peoples of each country and to a desire for increased military power which then, in turn, led to an alliance system between the European nations.
This alliance system was particularly helpful during World War II when the European countries needed to band together to defeat Hitler and the Nazis. However, before World War II, the European countries would enter into World War I for their nationalism, imperialism and militarism tendencies.
Nationalism is partly to blame for each of the wars as well because it was the primary reason why many of the European countries decided to build up their armies as well as their navy. It also was the reason for the great industrial movement and development in Europe, as the Europeans wanted to prove their greatness by inventing the latest tools and gadgets.
The European nations had a balanced power until a Serbian revolutionary killed Archduke Franz Ferdinand, the nephew to the Emperor of Austria-Hungary and one of the heirs to the Austrian throne. The revolutionary also killed the Emperor's wife. From here, the countries were lured in one by one to take opposing sides and to fight in the First World War. After the end of the First World War, the countries formed their tight alliances with one another, which would be used in World War II.