Nationalism is a powerful force that is ill understood, primarily because most of the Intellectual class consider themselves "Internationalist," or "global." Nationalism gets a bad image primarily because the intellectual elite GENERALLY dislike the idea of the Nation as it is a difficult thing to capture in words and as many have noted while it has incredible abilities to captivate people and generate mass scale solidarity, it is intellectually unsupported by any real intellectual class and has the most anemic philosophical framework behind it. Most self ascribed Lefties, of whom most of the intellectual class belong to, do not like nationalism and have since Karl Marx and before been largely International or the sort to say "I'm a citizen of Earth!" or something to that effect, people whom believe they are at home anywhere. Of course this also overlaps with a fairly wealthy, privileged and powerful class of people whom can afford elite education as well.
Ernst Renan for example describes it as a means of creating Mass scale solidarity. This mass solidarity between people is beyond tribal lines and kinship clans, you have to create what is called the "Imagined Community," by Benedict Anderson that has some essential sense of self beyond its constituent members. While the left generally regards Nationalism with contempt on its surface, it should be noted that since the Russian Revolution of 1919, all Left wing revolutions, and all successful Marxist revolutions have been absolutely Nationalistic projects. After all it is the Peoples Republic of China, Not the International Workers Sector of East Asia. As of yet the Left has provided no alternative TO Nationalism which wouldn't be impossibly utopian, or achievable or that has failed to get off the ground. Even the EU is basically a faux-Internationalist but really just creating a new Nation and ideally a New Nationalist community. Part of this is education and the intellectual nature of our leadership. As a largely elite, technocratic ect group the fall in line and most don't believe in the Nation and are more Like Anderson, Bhabha, and other writers on Nationalism that see it as the foolishness of the Lower Orders of society. But again, there has emerged no successful attempt to construct any other form of Large Scale solidarity as the Nation. Even Soviet Communism failed to create such a thing and ultimately retreated to the "Nation," as a means of creating solidarity and using autonomous oblasts for cultural and indeed ethnic enclaves.
I would charge that nationalism and national identity are fairly important. States without nations prove very difficult to hold together or create some sort of comradely or engineer anything close to a functional Social Democracy in a society composed of millions of atomized individuals looking out for their own self interest or immediate kin group. Alternative forms of mass solidarity have been total busts IMHO and statistically so, and generally even the Anti-Nationalist left only has great success when it is forced to become nationalist to gain any revolutionary support or mass solidarity.