We have some threads on that, but, in short, the juice to the starter solenoid is triggered by the starter button; the headlight power also always runs through that button except at start up when you push the button in, then the headlight is unpowered so as not draw any juice away from the starter. This puts extra loads on the starter button, and over time, as corrosion sets in, heat is created; not good for the little bits in there (and there are more than usual). carefully pulling it apart, with a catch rag mounted beneath, and systematically popping the little bits out, cleaning up and reassembllng with a bit of dialectric grease is good service for this often long neglected switch. And they are expensive to have to replace.
If you have any other aux. lighting wired in with the headlight it will also be run through this and can easily overload it. If you dont have any, good, if you do we also have info on putting in a relay to unload the switch (WAY good).
'81 Yamaha SR500 Caff Racer, the Old School Real Deal
'09 Suzuki TU250X ,The Silent Red Fellow
'98 Honda 750ACE Deluxe