It's an old phrase, derived from a song, "Dear John". Basically it was a letter written to a soldier serving abroad by his girlfriend who had found a new boyfriend and was telling him that he was dumped. Any such letter used to be referred to as a "Dear John" letter.