Programatically change a lightswitch value on an entry on save
You can set the value and save like so:

craft()-&gt;on('entries.onSaveEntry', function(Event $event)
{
    $entry = $event-&gt;params['entry'];
    if ($entry-&gt;section == 'mySection') {
        if ($entry-&gt;getContent()-&gt;myLightSwitchField == 1) {
            $entry-&gt;getContent()-&gt;setAttributes(array(
                'myLightSwitchField' =&gt; 0
            ));
            craft()-&gt;entries-&gt;saveEntry($entry);
        }
    }
});


However, you might consider using onBeforeSaveEntry so that you don't have to save the entry twice (and/or run the risk of creating an endless loop).

craft()-&gt;on('entries.onBeforeSaveEntry', function(Event $event)
{
    $entry = $event-&gt;params['entry'];
    if ($entry-&gt;section == 'mySection') {
        $entry-&gt;getContent()-&gt;setAttributes(array(
            'myLightSwitchField' =&gt; 0
        ));
    }
});