Over many many years the problems for me were - in order:
1) Corrosion or physical damage within the light meaning that the bulb wasn't connecting to the bits it was meant to connect to (fix with scraping, bending, and stuff squeezed into gaps to push things together)
2) Corrosion or dirt between wires and where they connected to the light bodies. Fix with scraping, bending, and squeezing things into gaps to push things together - and occasional bits of solder and insulation tape.
3) Slipping dynamo against tyre (fix with gluing something less slippy to the rotating bit of the dynamo body).
I eventually found the ideal (if somehow defeatist) solution, which was to give up and carry much lighter and brighter LED lights. In many ways this is a shame. For many many years I swore by dynamo lights - they were always there, difficult to steal, and brighter than the alternatives. But now I have lights I can remove in a moment, which are small, light, and MUCH brighter than a dynamo - and yes, one of them has a lovely wide beam just like the dynamo.
Maybe more helpfully, my tips for fixing are probably to use the multimeter - disconnect everything, test the resistance of everything to check connections, test for power from the dynamo with some kind of direct connection to it (multimeter or wires straight to a bulb), check the bulb with a battery or again with the multimeter. Connect everything back together bit by bit, testing as you go. It'll fix it... it's a simple process (does electricity flow from A to B or not)... you'll know where the problem is for the future... but it does take time. Every time I tried to shortcut this process I got in a muddle - when I did it this long way I always worked out what was wrong. Don't forget if you start testing for connections that there's a connection right through the dynamo itself - that used to get me confused - indeed I may still be confused, but I think I'm right.