Given the time frame that you mention here, I am assuming you are talking about nationalism specifically in Europe. If that is the case, the main factor that influenced the rise of nationalism was the French Revolution.
Before the French Revolution, people generally did not really think that nations (a group of people bound together by ethnicity, language, and such) and states (political entites or countries) went together. The idea that, for example, all French people should occupy one country was not particularly widespread. Instead, states were identified with monarchs and dynasties (like the Empire of Austria-Hungary where many nations were together under one state because they all "belonged" to one dynasty.
After the French Revolution, this changed. All of a sudden, the connection between state and monarch was broken. If a state is not held together by loyalty to a monarch, then what does hold it together? The answer, increasingly, was nationalism.