Consider the following examples:
Just then he saw the fish.
That’s when he saw the fish.
Is there any difference in meaning between these examples?
As Joe Z. says, these have distinct syntactic structures.
They can also have distinct meanings. Both refer to the time when the fish was seen, and both That's when and just then may be used to refer to a specific moment in time:
okJoe turned. That’s when he saw the fish.
okJoe turned. Just then he saw the fish.
But that's when can also refer to a broad timespan, while just then cannot, because it means “at that very moment”:
okJoe spent 2010 in Colorado. That’s when he saw the fish.
∗ Joe spent 2010 in Colorado. Just then he saw the fish.
∗ marks a usage as unacceptable
ok marks a usage as acceptable
Well, speaking strictly from a grammatical point of view, "he saw the fish" is an independent clause in the first sentence and part of a subordinate clause in the second one:
Just then, he saw the fish.
That's when he saw the fish.
But from a narrative point of view, they serve roughly the same purpose. They both introduce an event that is key to the plot of the story, occurring at a very specific moment in time.