Transformers exploding. The bigger the flash the bigger the transformer. Even the little cans you seen on poles give a nice flash. I'm guessing some of the bigger flashes are substations.
The bigger flashes MAY be transformers, but most flashes are from arcing (short circuiting) lines. The lines are protected by circuit breakers that almost instantly cut power when shorted, then quickly reset. If the condition still exists, there will be another flash, the breaker will trip again. This may occur several times in quick succession until the breaker gives up and stays tripped.