So if you arrive on time for something, you arrive at the scheduled or expected time.
So you can arrive on time for work, on time for an appointment or a meeting.
Trains run on time. Buses run on time.
A plane can be on time if it's at the scheduled time.
The opposite of on time is late.
If you arrive in time for something, you arrive sufficiently early
or just before an event happens or just before a situation occurs.
So maybe you missed half the movie, but you arrived in time to see the end of the movie.