If the Lightsource is made with separate blueprint:
Light Sources have a property of "On" basically, this can be TRUE or FALSE (no explanation required there

)
In script, this property can be changed with the function:
SetLightActive( object oLight, int bActive );
where oLight is the LightSoucce object
bActive is TRUE or FALSE
To efficiently switch between on/off, unfortunately, Obsidian do not include a GetIsLightActive() function, so It's recommended that an Integer be set on the lamppost or the light source to keep track of its on/off state
---------------------------------------------------------------------------
If the Lightsource is part of a Placeable Illumination:
SetPlaceableIllumination(object oLamp, int bActive );
(In theis case, oLamp refers to the parent LACEABLE, not the specific lightsource light itself.)
To Efficiently switch between On/O ff, this is a nice way to do it:
SetPlaceableIllumination(object oLamp,(!GetPlaceableIllumination(oLamp)));
NOTE:
You should ideally call
RecomputeStaticLighting(GetArea(oLamp));
After any Illumination changes (not after each individual one if you are doing more than one in an area at the same time, though)