Almost certainly it's the starter button!

I know this sounds ridiculous but there is a switch in there that turns the lights off when you start the bike to reduce the load on the battery. This switch is known for getting gunked up and not allowing the lights to work, particularly if the problem happens in association with starting (as yours does).
Take the switch apart and give everything a good cleaning.