Hi. Getting some sparks means the magneto is working, condenser is fine and the fault lies between the HT spike on the internal coil, and the spark plug, assuming there is no spark at all from that lead.
Start with the slip ring on the magneto armature. It should be smooth, clean, no sign of carbon deposit and have an undamaged brass segment. The pickups need to be clean, with spring loaded brushes in place and free moving. These carbon brushes need to be hard, hard enough to just mark paper. If they write like a pencil, they're too soft and will deposit carbon dust on the slip ring track.
There are D shaped fibre washers under the pickups. As well as being further insulation from the magneto body, they position the pickups the correct distance from the slip ring. Test the plug lead and cap by swapping to the good side. Even if the pick ups have been changed, do a continuity test between the brush and the plug lead connection. There is also another carbon brush at the drive end, under a brass slotted screw cap, here again it should be clean and free moving. This is the earth connection to the armature.
Although all may appear in order at low voltages, HT does strange things, always searching out the path of least resistance, and yes, running it in the dark can often indicate the source of wayward sparks.
If the magneto is still off the bike, it is a good time to strip it to its major parts, in order to check the slip ring more closely for signs of tracking. You won't upset the bearings if all is simply replaced in the same way it came apart. The bearings will benefit from a dab of grease. Plenty on the forum about magneto servicing, and the strip down procedure to avoid damage. Both Priory Magnetos and Brightspark Magnetos have excellent informative websites, well worth a look.
The forum has an introductions section, let us know a little more of your experiences.
Swarfy.
Additional. The later type steel backed (rather than brass) points carrier will produce misfiring and erratic running if the points spring touches the cam ring. This is because the electrical path to earth is different from the earlier brass points carrier. Make sure the points carrier is replaced correctly on the keyed taper and that the points rotate without any wobble.