If it's a desktop computer then yes it's recommended to unplug the computer until the lightning storm is over.
I unplug my desktop and even unplug the ethernet cord as well. I once had an ethernet port fried on a computer once during a lightning storm.