1) Open a new file, set the canvas size to about 4000 x 3000 pixels.
2) Set your foreground color to white and background color to black.
3) Go to Filter > Render > Clouds.
4) Go to Filter > Render > Difference Clouds.
5) Go to Image > Adjust > Invert.
6) Go to Image > Adjust > Levels.
7) Move the arrow in the middle all the way to the right.
8) To change the color of the lightning like I did, go to Image > Adjust > Color Balance.
* I learnt this from an internet tutorial a while ago. Unfortunately I can't remember which website it was on so I can't give it's author the credit he/she is due.