Consequence is the experience of watching events unfold. Sometimes, consequence is no more than the pay-off that stops choice feeling hollow [...] It’s closest to the traditional spoilable pleasure of ‘what happens next?’ - Failbetter Games
In Dungeons and Dragons consequences are where the Dungeon Master gives back to players. Consequences are what make player choices matter, and choices are how players express themselves. Therefore consequences are how you, as a DM, say to your players “in this game, you matter”. So why is it that as a community we're obsessed with wielding consequences as a weapon of punishment, rather than using it as a reward, or as a tool of the fiction?
Consequences are Consequential
If PCs are agents of change, their change can only be measured by the what-ifs that follow. Previously the kingdom was in ruin, then the PCs installed their own replacement. What comes next will give retrospective weight to PCs' choice. Does the New King change the kingdom to be a better place? Does he struggle and descend into further ruin? Without knowing those consequences, we can't give an assessment of the PCs' original choice. One option is to make consequences relevant and proportionate. Ask yourself: what is the consequence about and how much does it cost?
Consequences should be related to the choice, the world, or the themes. In a race-against-time, the party comes across two bridges: one sturdy and stone and taking the long way around and one rickety and wooden and taking a shortcut, this choice pits the resources of time against the resource of health (safety). So when you enact consequences they need to A) be related to those two consequences, and B) honour the choice made. On the wooden bridge, the party should pass quickly but face danger, as the choice implied, or they will rightly feel like their choices don’t matter (“railroading”).
Proportionate means that the consequences are in-line with each other. In intangible choices the costs/benefits to the party must be approximately equivalent. Or in risk/reward choices, the risk must be proportionate to the reward. Proportionality makes the choice interesting, and allows the players to make the choice expressive. The choice between ascending the King's son, or voting democratically says something about what the characters deem to be important. Nobility vs democracy. But if the bastard son is an evil necromancer who will slaughter all to create an undead legion, and the people will democratically elect the second coming of our-lord-and-saviour-Bahamut-himself, then the choice doesn’t say anything that wasn’t decided in character creation (be they heroes or villains?).
Tools to Take Away
Consequences are often thought up in retrospect because D&D's choices are, by the very nature of the game, sometimes unpredictable. The two-tiered response of relevant and proportionate is applicable backwards as well as in prep, and will help your choices to remain interesting and expressive, and build their investment in their characters and the world.