Usually when it is getting close (as measured in the interval between the flash and the boom). I pull out the plugs even though we have surge protectors. I lost a server at one of my stores despite a surge protector in a lightning storm.
I have my computer and peripherals plugged into a battery back up. If it's a really bad storm I turn off the computer and then unplug the battery back up. Until recently we had whole house surge protection from the electric company and I didn't worry as much about things getting fried. Now that the electric company discontinued the service, I have been unplugging things in bad storms. I was amazed at how many everyday items have electronics in them.