In the case of catching the train, both "in time" and "on time" are fine. The first implies that you arrived with enough time to catch the train, while the second implies that you got there before or at the time the train was scheduled to depart. In most cases this is the same thing, but you can see a subtle difference:
"I didn't arrive on time, but the train was delayed so I made it in time to catch it anyway." (ie. the train was scheduled to leave at 12, you got there at 12:05, but the train was delayed until 12:10).