I have been experiencing some strange behaviour on my computer. It happens at times when the kitchen light switch is turned off although my computer is in the study room. If I am surfing the web, the browser would automatically resize. If I am writing on a word processor or text editor, some random characters would appear. How do I protect my computer from such random occurrence?
It sounds like some kind of Electromagnetic Interference to me. If the issue is fairly reproducible (I.e., you can turn off the light and you know something will happen with 10 minutes) then I'd try and narrow it down by disconnecting your keyboard and mouse.
Additionally, if you're using PS/2 keyboard or mouse then swap them to USB and see if that helps.
You could also try to tidy up any cabling, disconnect any peripheral devices (Printers etc) and speakers, to see if that makes a difference.
Finally, it could be an Earth / Grounding issue. You don't say where you are, so without knowing your local requirements I can't say much more on this but I've seen grounding issues produce some very peculiar issues on computer equipment.
I can't fathom why the light being off would make a difference, but then it's hard to say without knowing what your wiring is like.