I think that most historians would agree that nationalism was a primary cause in World War I. The nations involved in World War I were guided by a belief that their country was exceptional and worthy of dominant status. This love of country was beyond patriotism and moved into a realm of nationalism in which one's dominance had to come at the cost of another nation. Logically speaking, if multiple nations possess this mindset, armed conflict in the form of war becomes inevitable. Nations such as England and Germany were focused on a dual pronged approach in which fear of "the other" and asserting their own strength were complementary. This made conflict inevitable and helped to explain why it was initiated so quickly. Accounts of the start of the war brought out this nationalism element as a cause for the conflict:
The first month of the war resembled a month-long patriotic festival. In the first three weeks of August, Germans said goodbye to their troops, smothering them with flowers and so much chocolate that the Red Cross asked the people to be less generous: the soldiers were getting sick.
The combination of nationalism and its vehicle of armed conflict played an important role in starting World War I.
Interestingly enough, imperialism and the reality of resources dwindling are another important cause to the war. At the time of the war's outbreak, European nations had been on a type of race to colonize the world. The expansion of imperialism all over the world created a "colonies race." Yet, it also served to heighten tensions. As more nations fell under European flags of control, there were less nations to colonize. The reality of scarcity began to impact decision making in European governments. Different parts of European society began to see the emergence and control of foreign markets as leverage against aggression while protecting resources and means of wealth: "Public opinion in Germany was feasting on visions of Cairo, Baghdad, and Tehran, and the possibility of evading the British blockade through outlets to the Indian Ocean." Allied forces like England and France also recognized that they enjoyed privileged status in their colonial exploits. The reality of coveting finite resources helped to move nations towards war. Nations realized that in defeating other nations, colonial jewels would also become fruits of aggressive and militaristic labor. It is in this domain where the need to preserve dwindling resources in the form of imperialism played a very important role in starting World War I.
The pursuit of secret alliances in the hope of facilitating greater land acquisition represented another important cause in World War I. Nations had locked themselves into secret treaties with other nations in the hope of advancing their own claims. The result became that when one nation declared war on another, they were actually involving multiple nations into the conflict. Since these alliances were brokered in secret, the scope of the war widened because nations were unaware of who was aligned with one another. This helped to make the conflict on such a protracted scale, creating a wide swath of death and destruction.
These three causes are significant to the development of World War I. Certainly, with such a conflict so much can be seen as causation. Yet, in these three causes, the reality of World War I became realized.
The network of alliances was also a major cause of World War I. There was the Entente Powers: Russia, Great Britain, and France. And in opposition to them was the Central powers: Austria-Hungary and Germany. Although these alliances weren't formally made; the multiple treaties betwixt the countries made them effectively so. This web of alliances is what made it possible to become a world war.