English speakers are fairly loose in this regard. The different greetings overlap, and your reader is unlikely to worry too much about what you use (unless it's 8 a.m. and your characters are saying "Good afternoon.").
A rough guide, however:
~5:00 to ~12:30: Good morning.
~12:30 to ~ 17:00: Good afternoon.
~16:30 to ~21~5:00: Good evening.
~20:00 to ~5:00: Good night (A tricky one. As far as I know, us English speakers don't say "Good night" in greeting, no matter how late in the day it is.)
But these answers are approximate. The greeting might also vary depending on how light it is outside (You might say "Good morning" at 4:30 a.m., if the sun is up); the speaker's own schedule (If you generally wake up at 10:00, you might stretch "Good morning" as late as 13:00); or day of the week ("Evening" on Friday lasts longer than on Tuesday).
If you really aren't sure, just have them say "Hello" or "How are you?". A time-based greeting is not required in English.