to turn a streetlight on / off, first you need to find its objectUD number, which you can do in the editor
By default all strretlights are in an auto mode, eg they come on at night, off in the day
to manually overide this, then use one of the following lines
lets say the strreetlight is object ID 33456
[object33456] switchlight "OFF"
[object33456] switchlight "ON"
to turn back to auto
[object33456] switchlight "AUTO"
this command can be placed in the init.sqs to make sure the lights are on/off throughout the mission or a script if you need them switching on or off for specific times etc