I use my computer all the time during thunderstorms. I doubt it would hurt you but it could fry your computer if lightning strikes your modem and router and you have ethernet.
If you want to though you can always unplug it just to keep your computer safe.
But I would get bored without the computer during a thunderstorm so I just take the chance and use my desktop computer during the thunderstorm.
So far nothing has happened to me or the computer.