Seems like thunderstorms either happen in the heat of the day or overnight. It's rare to for me encounter a thunderstorm on the way to work. On the way home, I have a little more flexibility time wise and can wait out a storm at work if need be. They don't typically last long. I've also ridden home during a lightning storm but if there are high winds or very frequent lightning, I'm going to wait.
If it's just plain rain with some infrequent lightning/thunder I'll ride.