The switchlight command is used to control the status of streetlights. The lightison command can be used to check if the light is on or not.
See this OFP demomission for an example of how to use this command.
OFPEC Example