The electric charge difference between the earth and the atmosphere grows with altitude, at around 88 DC volts per meter. This electric potential may be shorted out when a thermonuclear explosion releases radiation which ionizes the atmosphere. About 5% of a nuclear explosion's energy is in the form of ionizing radiation.
A study of lightning flashes caused by a thermonuclear detonation in 1952 may be of interest, though I read only the abstract, as the full article requires payment: http://onlinelibrary.wiley.com/doi/10.1029/JD092iD05p05696/abstract. The lightning started from the surface and was upward propagating. As the earth has a net negative charge, and as thermonuclear explosions deposit negative ions in the atmosphere, I don't know how to explain the upward propagation of that particular test. However, see anna v's comment.
Uman, et.al., studied the same detonation in 1972 and found that "the likely mechanism for the necessary charge and electric field generation were Compton electrons produced by gamma rays from the detonation" - Lightning: Physics & Effects, Rakov, Uman; Cambridge University Press, 2003.