Use the proper tools for selecting or deselecting all objects or lights.
Pick all objects
Unpick all objects (pick nothing)
or
Choose Pick > Object and press the on empty space.