Did armies deliberately massacre people, in the name of religious fanaticism? Were there deliberate attempts at what would later be called "ethnic cleansing"? Or was the loss of life the result of disruptions to food production and distribution, producing poor harvests, famines etc? Question inspired by this map.
Well, the short answer is "all of the above", with the exception of ethnic cleansing as the category that doesn't really fit in seventeenth century Central Europe. It's worth clarifying that not everyone missing from that chart simply died, as many became refugees, much as we see Syria's war produce huge numbers of refugees today. Regardless, something nearing ten million people died as a result of the war, the vast majority of them in Germany.
The main killer: military forces in the Thirty Years' War could only on rare occasion rely on supplies being delivered to them; this typically meant that their captains (or his deputy, more likely) would be responsible for acquiring food and alcohol while deployed in the field. Depending on how recently the division was paid, the price of food in the area, the availability of food in the area, and the discipline of the soldiers, supplies were often extorted, stolen, or otherwise pillaged from local towns and villages. This behavior is likely responsible for the majority of depopulation, directly and indirectly: murder, disease, and starvation.
This is not to say that massacres were unheard of: the "Sack" of Magdeburg, the most infamous massacre of the War, saw approximately 20,000 people killed in a single night. Retreating armies could be run down, surrendered rank-and-file soldiers were often killed outright—death was very cheap.
The Thirty Years' War also coincided with decreasing global temperatures, which resulted in worse yields and food instability. While the worst effects of the so-called "Little Ice Age" wouldn't hit until just after the Peace of Westphalia ended the war in 1648, the German population was already in a fairly precarious position as the war began. Where ever soldiers pillaged and looted (that map would also suffice as a reasonably accurate map of pillaging), the results could be devastating for local and even regional economies. Fields could be burned, military-age men could be conscripted or murdered outright, trade routes were disrupted, and the traditional structures for aiding the poor (the Church in Catholic areas, and increasing the state in Protestant) were simply unable to cope in this extreme of circumstances.
Sources:
Wilson, Peter: The Thirty Years War: Europe's Tragedy.
Parker, Geoffrey: The Thirty Years War, Second Edition.