During a lightning storm, what causes the lights to temporary cut off and on?
Like your house, the electrical distribution grid has circuit breakers to protect components from overloading. 

Unlike your house, the circuit breakers used on distribution equipment don't just pop open and stay there. Instead, "automatic reclosers" are used.

The idea behind a recloser is that most fault conditions that happen outside to distribution equipment are transient in nature: lightning strikes, falling branches, exploding squirrels, and the like. Once the lightning dissipates, or the branch hits the ground, or the animal combusts, the fault condition is cleared. So reclosers will open the circuit when a fault is detected, then attempt to close it again a few seconds later. If the fault persists, the circuit will open again and the recloser will try again after a longer wait (perhaps 20 seconds.) If the third time isn't a charm, then the fault probably requires a human to come repair it, so the circuit will stay open and alert the utility company to send someone to fix it. However, reclosers can be programmed for pretty much any sequence of tries until they give up.

Here's a wikipedia article on reclosers.