OK so you lost all electrical power. You were riding along and the motor died and all lights are off, or... you come to your bike, flip the key, and nothing, its all dead. Don't freak out! We'll get this.
Most commonly, you lost either power to the bike from the main battery lead, or you lost your main ground. Take off the seat or side panels, and expose the battery. Now, unscrew the two large terminals, black and red, and scrape with a screwdriver or small file any corrosion that may have built up. This will generally be either rust or white stuff. Scrape it all off. Now follow each wire to where they connect and do the same. The negative will run to either your engine block or the frame, and the positive will go to the starter solenoid. Clean it all up.