You must have some sort of a bad ground to the ignition system. so do a good look at your wiring. It's even possible you might have a failing cdi or mag coil, or a kill switch. If your bike is left out side in the weather then your going to have electrical problems sooner than if it's kept inside.
You might want to check the spark plug, and the plug wire, make sure there is good tight connections, any thing that looks like bluegreen poo in the wire is corrosion and will kill the spark, replacing the wire will cure it. Use a copper core wire, resistor wire isn't as good on these engines. You will also need to clean any of the corrosion out of the cdi spark plug wire hole. Dielectric grease on the connections will help stop the corrosion from coming back. Most auto parts stores sell the stuff, in a bind use petroleum jelly or plain grease.
Now for the spark plug, I prefer to run 0.017 to 0.020 spark plug gap. These engines ruin spark plugs, for me the cheaper the better. I don't see the need for the high tech expensive plugs, but it's your money so you buy what you like. Regular gas and a good syn. oil at 32 to 1 or 40 to 1 mix.
I probably didn't cover your wire problem real good but you are going to have to do some close looking at the wiring to find the problem. I threw out all the other stuff as all these can also cause the problem. So do one thing at a time then try the bike out. Don't do a bunch of stuff as you will not learn which one fixed the problem if it does.