haha that's a good question. actually there are two techniques:
1. use bulb mode - set your cam on a tripod, close the apperture and set the bulb. Release it after the lightning.
2. second method is mine: continuous shooting. My cam allows me to take 40 pics. The time between each shots is 0,6 sec. so there's a huge probability you'll get one.
But this is a real trial and error method
Btw. Those shots are really great! especially the third one! Did you crop it in ps or its the original?
2 and 3 are cropped but not much. The lightning is less than 2 miles away. As for the question of how it is done. See my write up in the how to area or click here...