I'm not very sure if both mean exactly the same but I've noticed that the former is more widely use in Japanese novels translated into English. Whereas the latter is more often used in English novels (not from England but originally written in English).
It was then that the thought occurred to him.
That was when he spotted the man.
Is one more commonly used than the other? Which one you would usually in literary work?