How is the damage for thunderwave rolled? The PHB says that you just roll the d8, but it doesn't specify that you roll for each creature or roll once and each creature that fails takes damage equal to that one roll on a failed save. How exactly does it work?
Roll the damage once. For Thunderwave, this would be a number of d8 dice depending on the slot you used to cast the spell. Once you total up the damage, apply it to each target of the spell.
From the Players Handbook p. 196, in the "Combat" chapter (or here in the basic rules):
A spell tells you which dice to roll for damage and whether to add any modifiers.
If a spell or other effect deals damage to more than one target at the same time, roll the damage once for all of them. For example, when a wizard casts fireball or a cleric casts flame strike, the spell's damage is rolled once for all creatures caught in the blast.