Observant Jews are not permitted to turn electronic devices on or off during Shabbat. It is also forbidden to ask someone to do it for you, even a Shabbos goy. One may only imply or hint that they need a service performed for them, without directly asking.
Additionally, one may not deactivate an electronic device with voice commands or sound activation, even if no buttons are physically pushed.
One solution for turning on and off the light on Shabbat is the Kosher Lamp.