(I'm not sure if other people use this term similarly, but feel free to use it this way)
When someone says "goodnight," they may be expressing a few different things: surprise, laughter, or shock. Think of it as a "daaaaamn" or "lmfaooooo" or "whaaaat?" kinda thing.
1.
Jennifer: Tom, did you hear that Lily was impregnated by her ex-boyfriend!?
Tom: Goodnight ð
2.
Jennifer: *Tells a stupid joke."
Tom: LMFAO, goodnight ð