Grammar Girl, Mignon Fogarty, writes this:
Technically, those e-mail messages you write should begin Hi, John—with a comma after Hi.
You see, Hi, John is different from Dear John because hi and dear are not the same kind of word. Hi is an interjection just like wow and ugh, and dear is an adjective that modifies John.
In Hi, John you are directly addressing John, which means the punctuation rules of “direct address” apply. From a comma-rules standpoint, Hi, John is no different from Thanks for coming, John or Wow, John, what were you thinking?
You can end Hi, John with a period or, if you continue the sentence, a comma.
So now you know.