Make, model, and year? I'll assume this is your XS triple.
Ignition switch might be a problem.
Time to break out the multimeter.
Set the meter to read 20V DC and then put the positive probe onto the red wire leading into the ignition switch and then the negative probe to bare metal on the bike. You should see about 12.5V. If not, trace back to the main fuse and check resistance between either side of the fuse. You should get close to zero Ohms. If you're getting an Open Line, then the fuse is bad or isn't seated well. If the fuse is good, check resistance between the positive terminal of the battery and the terminal for the red wire on your ignition switch. Again, you should get pretty close to zero Ohms. Open Line here means the wiring has gone bad.
Assuming your resistance measurements have checked out, the next step is to double check your ground. Read resistance between bare metal on the bike (engine is a good spot) and the negative terminal of the battery. Again, you're looking for about zero Ohms. Open line or a reading much over one Ohm means a bad ground.
Finally, lets get back to checking the ignition switch. Unplug the switch from the harness and turn it to the on position. Read resistance between the red wire and the blue wire and then again between the red wire and the brown wire. Both of these checks should also be less than an Ohm. Open line or higher resistance means a bad switch. Time to refurb it or replace it.
Let us know how you get on...