I'd say he needed something to do and you were an easy target. Don't take it with a grain of salt. Maybe your lack of lights could lead to a potential accident involving you, a car and worst case scenario a fellow cyclist.
I bet if you had old Schwinn Varsity's he'd pull you over and say "I had one of those when I was a kid...sure was fun...Hey get that problem fixed before I have to give you a fix it ticket."