Which bike? What year?
Common places for total electrical failure is a blown main fuse, melted fuse (yes, there is a difference) and/or key switch issues.
Fuse:
Is if blown (fried in the middle) or melted (looks OK, but a replacement fuse fixes the problem temporarily)
Key switch:
Is the connector loose or corroded? Does wiggling the key cause the bike to light up?