The difference between night time and nighttime is nothing much. Both the words mean the same thing and express the same nature. The question is only about the word structure.
Nighttime or night time: which one is correct?
When we look up at the sky and see the sunset, the pink golden sky fades away into dark blue from the edges of the horizon. That particular time of the day is what we call nighttime. But wait! Is it right to call it nighttime or night time?
Well, the answer simply relies on the difference in the structure between two compound words that are used differently in two different dictionaries. In the American dictionary, the Merriam-Webster Dictionary, the word nighttime is used to describe something that is the evening time of the day. On the other hand, in the British dictionary, Oxford’s Lexico, the word night time but with a hyphen is used to describe the same thing. Also, the Cambridge dictionary recognizes the term night-time.
That means that both the words are correct grammatically. While nighttime is used as a single, closed compound word in the American dictionary, night-time is used as an open or hyphenated compound word in the British dictionary. However, saying nighttime usually seems awkward due to the double consonant use. So, commonly people refer to the night-time instead of nighttime.
Final words
It is not incorrect to use both words interchangeably. It is just a matter of structure that changes according to different dictionaries.