Janus gave an explanation of why, if the speed of light is the same in each observer's frame of reference, that means different observers must disagree on whether events at different locations, like the two lightning strikes, happened simultaneously or at different moments. You can also watch a youtube video
here which gives a nice illustration of the train thought-experiment. But I want to add a little to this to make the connection to "time travel" more clear. One of the basic principles of relativity is that each inertial (non-accelerating) observer measures the same value for the speed of light in a vacuum, but another principle is that
all the laws of physics appear the same in each observer's own rest frame. This means that if I am in a sealed windowless spaceship moving inertially, and you are in a different sealed windowless spaceship which is in motion relative to my ship (and also moving inertially), then if I do some experiment on board my ship and you perform an identical experiment on yours, we should always get the same result. Now, imagine we both had some device which could transmit information faster than light--"instantaneously", let's say.
Now let's repeat the idea of the train thought-experiment, and suppose the observer on the side of the tracks has an FTL transmitter at the location of the strike at the back of the train, and at the moment the strike happens this transmitter sends a signal to a receiver at the location of the strike at the front of the train. Since both strikes happen simultaneously in the frame of the observer on the side of the tracks, and since the transmitter transmits information instantaneously in the frame of the observer on the side of the tracks, that means the receiver will get the message about the strike at the back of the train at the same moment that the lightning is striking right next to its own location at the front of the train (of course the train is moving relative to the receiver, so its location only coincides with the front of the train for a moment). But now remember that in the frame of the observer on board the train, the lightning actually hit the back of the train
after it hit the front of the train. So in this frame, the receiver is actually receiving information about an event that "hasn't happened yet"!
This wouldn't be so bad if we just imagined that one frame's definition of simultaneity was the "correct" one and the other wasn't. But if the laws of physics work exactly the same in every frame, that must apply to whatever laws of physics govern the FTL transmitter too...so, if it's possible to build a transmitter which sends information back in time according to the train-observer's definition of simultaneity, it must also be possible to build a transmitter which sends information back in time according to the track-observer's definition of simultaneity. It works out so that if you are moving away from me at some significant fraction of light speed, and we each had FTL transmitters of this kind, then I'd be able to send a message to you which traveled "instantaneously" in my frame but "backwards in time" in your frame, and then you could immediately send a reply which traveled "instantaneously" in your frame but "backwards in time" in my frame, and the result would be that I'd actually receive your reply before I sent the original message! In this case
every frame would agree that causality had been violated and that information had traveled back in time. Of course, this is a pretty good argument for suspecting that FTL communication is forbidden by the laws of physics...