When lights come on at times when they are not supposed to or turn off when they are supposed to be on with known good bulbs grounds can be an issue. Current flow is simply a difference in potential, not just a positive/negative thing. So if you have a bad ground for example in the lighting circuit current will try to find a way to ground. Like all things in nature current is lazy and will ALWAYS find the route of least resistance. This route may be the filament of another bulb that shares a common power lead what you get is the bulb with the good ground now fields the current for both bulbs, which will make the well grounded bulb to be brighter than normal, but the other to be on but dim. Look for the dim ones wiring. Under normal circumstances the resistance of the other bulb is higher than the route to ground as designed so the feedback issue described before isn’t an issue, but it’s a great troubleshooting tool when things do go wrong.
Always check voltages on all terminals of a bulb socket. If you attach the black lead of your meter to the - terminal of the battery (not just to the bikes frame) and probe ALL the light socket including the outer shell which is usually ground, you can see if there is any stray voltages where they don’t belong.
So for a typical blinker/running light socket you should see from the battery - to the center 2 pins 12v and to the outer shell 0v. This is normal. But if you see say 5v on the outer shell, it is still a lower potential so the light will light up, but there is an issue here where another circuit is back feeding some voltage back through looking for a ground. This is also why you use the battery and not the frame as this stray voltage may be residing on the frame, which will show 0v from frame to shell and maybe close to 12v at the center elements. I hope this isn’t too confusing, if it is let me know what part and I will try to reword it.
It’s best if you can download a schematic of the bike’s wiring or the separate circuits to assist in finding where everything goes. Laying a bike down, then suddenly gremlins pop up... first you need a friend to buy you a bell, then start looking in the area where the gremlins were able to jump on (ie where the bike hit the ground).
Hope this helps.