In my experience (I am not a mechanic, but tend to do most of my own work on my motorcycles), most electrical problems tend to be something in the wiring.
Not knowing anything about your bike or the nature of the problems you are having, I would say the first thing to check is that all ground connections to the frame and battery are clean and tight. I had electrical gremlins on an old Honda that turned out to be nothing more than some corrosion on one of the ground wires attached to the frame. Caused all sorts of wonkiness.
Other than that, you should be able to find a shop manual for your bike that will describe how to test individual electrical components to track down a fault.