For the Headlight, pull the headlight out & clean the contacts,  
then use that 99cent electrical connection goop they sell at the counter at AutoZone/etc. 
Also, the headlight will yellow/cloud over the years, may be time for a nice new replacement. 
 
Open the speedo and replace the bulb.  It's pretty easy.   
Again, clean the bulb casing & then use the goop. 
 
HBI may need a new bulb as well, open the casing and check it.  Again, it's not difficult. 
 
It's good to replace ALL bulbs periodically.  It's kind of like buying a used rifle... 
 
First thing you do, clean it meticulously, then oil/grease where needed. 
Second thing, replace all parts known to fail regularly...(especially bulbs & hoses).  
Third, new Brakes, Chain/Sprockets & Tires.  Adjust rear tire properly. 
Fourth...ALWAYS have a spare starter motor on hand...this is NOT an item to skip when you have a Yamaha. 
It will die, sooner or later, and you will need a replacement. 
When it dies, slap the new one in, and at your lesiure, have the old one rebuilt at a local shop. 
Fifth, always have a spare set of tune-up gear handy...and do one after getting the bike.  Plugs, wires, points/condenser/etc. 
Sixth...if at all possible, replace the points/condenser setup with Electronic Ignition... 
saves you pulling out your hair   But keep the old setup, in case of major sunflares/EMP attack. 
 
Great thing is, once you do the total PM, it'll give you YEARS of easy riding with little maintenance headaches. 
 
My Wifey's 1981 XS400 Special II