I believe they were Muslim. It wasn't a religious issue, though. WWI was caused by Imperalism, Militarism, secret alliances, and NATIONALISM. It was the Nationalism aspect that motivated Gavrilo Princip to shoot Ferdinand and Sophie. All the nations in Europe were very proud of their cultures. The Black Hand wanted to free the slavs from Austria-Hungary so that they, too, could have their own nation. They were part of Austria-Hungary but they didn't have the same culture or even speak the same language.
The fact that there were secret alliances caused a domino effect. Austria thought it safe to punish Bosnia by declaring war on them. They didn't realize they had an alliance with Russia. Russia joined the war to protect its ally, Bosnia. All the nations with alliances were suddenly at war.