My friends king quad was doing some stupid elec chit once turned out the battery cable was half melted off the battery, draw to much juice from the system eg. lights and the quad shuts down due to low voltage. check you battery connections and you main grounds that would be a good start.
look for broken or loose wires from the battery, take the wires off the bat and clean with a wire brush, re tighten. If it happens again try to start it in the dark or close the garage so it is dark, start it again, with the seat off the quad, turn on the quad lights and at same time look at the bat and see if you can see a spark any wheres. You may need to do it a couple times, good luck. Just an idea, let us know if you find the problem.