The key to singing in time is first knowing the difference between 'having rhythm' and 'singing in time'. It is possible to have one and not be able to do the other.
Patterns & Measures
The ability to recognize musical patterns, and how they are measured, and how they work together is the first developmental step in singing in time.
Once you understand musical patterns and measures, the only thing left to do is to practice putting the words and phrases in the right places in the song.