During the 18 years I spent as a professional railroader, I never heard of a train being struck by lightning. However, the rail is a different story. I've had many a late-night call to go out and shut down crossing signals that had been the victims of electricity from above. I've seen insulated joints and lightning arrestors fried by lightning bolts, not to mention relays and even a service entrance or two. I'm thinking the reason one is generally safe while in the engine cab or otherwise on board is that there is no ground (earth), but if you were a trainman and were climbing on or off at the instant of the lightning strike, it could be a different story. If we were switching when a lightning storm came up, we generally hunkered down in the cab until the excitement abated.