could be a lot of things you have to check all elctrics ot things to look at are the kill switch on the bars or even the stator plate some one had the same problem not to long ago and after change everything he found it was stator plate ...
is there power getting to the spark plug ? easy way to test is hold it in your hand see if you get a smallish shock .
also find clean and check all earths .
put a good/new battery on .
fist port of call would be the stator plate and its coils and wires check for any breaks or lose connections .
Electrics can be a right nightmare. See how you get on with MDK's advice and if you're still having problems I'll think of something else.
A haynes manual can be your best friend at times like these. It's also worth jumping on the General chat section and posting a friendly 'Hello' and introduce yourself. Just to be polite before jumping straight on asking questions.
This question comes up time and time again, would be well worth your time searching through previous posts. With this being a common question I bet your answers lies on this forum somewhere.
In the meanwhile if there is anything else I can think of I'll be sure to let you know..