a few points when my stop working:-
IS it all lights (dipped, full beam and side) - - each are on different fused circuits
If all, or just side lights working, maybe the switch - Take out and pull apart and and keen up all contacts, could also be a connection on the full beam/dip switch
In cases when it was just dip or main beam not working, check behind the fuse box, as you may find on of the contacts or wires has popped out
Also check the earth.
I find it's usual a combination of the above