I'm watching WWII in Colour, and it mentions during the Battle of the Bulge that German soldiers dressed as American soldiers behind US lines were killed by firing squad. The SS captured 150 American artillery men and killed at least 88 of them and it was called a massacre and war crime.
Why is one considered a war crime and the other is not? Are spies not given protection by the Geneva Convention?
In the particular case you're referring to, I'll point to the 1949 Geneva Convention, which states
- Members of other militias and members of other volunteer corps, including those of organized resistance movements, belonging to a Party to the conflict and operating in or outside their own territory, even if this territory is occupied, provided that such militias or volunteer corps, including such organized resistance movements, fulfil the following conditions:
(a) that of being commanded by a person responsible for his subordinates;
(b) that of having a fixed distinctive sign recognizable at a distance;
(c) that of carrying arms openly;
(d) that of conducting their operations in accordance with the laws and customs of war.
Basically, what it says is that POWs must have a recognizable uniform of a sovereign state. If you are not wearing a recognizable uniform, or even worse, are masquerading in the uniform of another country, you're considered a spy under international law. By custom, it is permissible to execute spies after trial. (https://ihl-databases.icrc.org/customary-ihl/eng/docs/v2_rul_rule107_sectionb)
It is never legal, however little "legality" matters in a war, to summarily execute prisoners. Naturally, every army participated in summary executions. After the Malmedy Massacre you refer to, many American GIs were unwilling to take SS troops prisoner.