Lightning in dreams is a pretty flexible image. Some people enjoy lightning and therefore desire it as a background effect. Others are frightened of its power and unpredictability. However, there are many power metaphors that merit attention.
You may find yourself in possession of lightning as a resource for dealing with problems. This type of lightning is an asset for handling frustration that could be characterized as a wish-fulfillment. Dream logic: just blast it out of the way.
Lightning may also be a warning in your dream. If you have fears about lightning in waking life, a person whom you are with or a building that you enter in your dream may cause a lightning effect. This is the mind's way of offering a dramatic visual warning. There may be an element of judgment involved, as divine wrath is often envisioned as a lightning bolt (personified in the Greek god Zeus and the Norse god Thor).
What did the lightning strike, and did anyone get severely injured?
Where did the lightning come from, and at what point in the dream?