I think I'm opening a can of worms.
I'm answering this kind of vague but, it has been determined allready that during a traffic stop or even a casual stop on the street an officer has the "authority" to investigate as covered in Terry vs Ohio and also search for weapons. Remember a stop should have reasonable suspicion if not probable cause. During a stop your 4th amendment may be temporarily voided due to the fact you have commited a crime and may be detained for investigation. This holds true for even a minor traffic stop because a citation is a legal summons and is isued in lieu of arrest.
I have never been one to even come close to violating a constituional right so for something like a tail light out I would not run serial numbers.