I'm not very good at electrical stuff but I would check your grounds to be sure they're clean.
Also check all the wires and be sure they're all intact and do not have any bare wire showing.
If everything else checks out then it could be your regulator or lighting coil. There's certain specs that you can check for on the coil, but I don't know what they are.
I know I've seen them here so you should be able to find them with a search.