If you're faced with a pile of shattered glass on the floor, 'How did the glass get broken?' is the best way of phrasing your question.
A straightforward past simple passive, 'How was the glass broken?' is grammatically correct, but not very natural in this context. As native speakers, we tend to use this type of passive for simpler situations, such as 'Where was the glass made?' or 'When was the glass bought?'
'How did the glass get broken?' is asking for a description of a more complicated set of circumstances, focusing not only on the moment when the glass broke, but also on who was involved, what they were doing with the glass, why they accidentally dropped it on the floor, and so on.