That lightning in the screenshot looks like it's generated with perlin noise. You could also generate a similar effect with a fractal algorithm in which you choose two end points, pick a random offset from the midpoint to make two new segments, then repeat with each segment. 3 or 4 iterations should do the trick for each bolt. If you want to branch, then that'll make it a little more complex.

The actual drawing looks like a simple lineto with a glow filter.