One rule, and it's not negotiable: the wine must be sweeter than the pudding.
Get it the wrong way round and a perfectly good dessert wine will taste thin and sharp. Get it right and the whole thing lifts. Beyond that, match intensity to intensity: a delicate poached pear doesn't need the same wine as a sticky toffee pudding. And remember that acidity keeps sweet wines from feeling cloying, which is why Sauternes and Tokaji stay so drinkable.