or simply Edit->Select All by Type->Lights
which if echo all commands is on Maya will tell you is:
SelectAllLights;
so you can ask what that is
whatIs SelectAllLights;
// Result: Run Time Command //
then you figure out what the runTime command does
runTimeCommand -q -c SelectAllLights;
// Result: select -r listTransforms -lights //
and that's what you use.