I would argue that it was not primarily a religious war. It's important to note firstly that a hard distinction between religion, wealth, and politics, is somewhat anachronistic for early modern Europe.
The Thirty Years War was an extremely complex event, really a series of conflicts centred on the Holy Roman Empire. Of all the major European states, only Russia remained uninvolved and Poland and the Ottoman Empire excersided considerable influence without intervening directly.
Religion was certainly an important focus for identity for the various combatants but it had to compete with an array of others, among them: political, social, and linguistic identities. Contomparies didn't speak of "Protestant and Catholic Armies", this was an invention of 19th century historiography, rather they spoke of "Imperial", "Bavarian", "French armies", ect. Many of these combatants fought against their co-religionists, and switched sides often.
As a civil war within the Holy Roman Empire religion played an obvious role in starting the conflict. The Peace of Augsburg failed to accommodate Calvinists and both sides hoped for further gains at the expense of the other. The Defenstration of Prague, the initial spark of the war, was the result of Ferdinand II's attempts to push the enforce the counter reformation there. Arguably though religion only added a stressor to what was an essential civil problem. The constitution of the HRE proved incapable of peacefully resolving disputes between the Emperor and his subjects, and between the subjects themselves. In an age of increasing political centralization, religion would provide a convenient tool of resistance and control as the case of defenestration shows. Catholics in Bohemia sympathized with their Protestant neighbours, resenting the imposition on their cherished rights and privileges.
As an international conflict the religious dimension is even more remote. Denmark and Sweden intervened primarily to seize German lands in the Baltic, and prevent the other from doing so, while France intervened to undermine their Habsburg rivals.
Main source: Europe's Tragedy by Peter Wilson.