A Photoshop Tutorial This tutorial is designed for Adobe Photoshop 7. Other image editing tools may or may not have tools for creating a similar lightning effect.
1. Open Photoshop and start with a new image about 700 x 300, and make sure the background is filled black.
2. From the menu select 'Layer' > 'Create' > 'New Layer...'
3. In the new layer perform a gradient fill from top to bottom going from white to black:

4. From the menu select 'Filter' > 'Render' > 'Difference Clouds':

5. Press CTRL+I on the keyboard to invert the image colors:

6. Select 'Image' > 'Adjustments' > 'Curves...' then drag the center node down and to the right until you get something simular to this next image (you can drag it a bit more if you want less 'fuzziness' in your lightning):

7. From the menu select 'Image' > 'Adjustments' > 'Hue and Saturation', click the 'Colorize' check box, change the 'Hue' slider to about 210, and change the 'Saturation' slider to about 65:

8. From the Layer Rollout, click the dropdown list and select screen. You will not see any difference here, but in the next step you will.
9. Open any image you wish to apply your new lightning effect to. Drag the layer from your lightning image over into the new image and let it drop there:

10. Rotate the lighning layer in the new image 90 degrees, and if you have to, scale it to make it fit. Place it where you want it to fit:

11. Clean up the impact point a bit with the eraser tool, maybe add some sparks if you like, and voila! You've got lightning!

If you want the lightning to be less fuzzy just adjust the curves a little bit more.
Have fun!