Hi Anonymous,
Imagine two people (A and B) are having a conversation and A says to B:
Guess who's coming to dinner.
This means a third person who is familiar to both A and B is going to eat with them. While A is aware of the identity, B is unaware so A wants B to guess who it is.
You can write it with an exclamation too:
Guess who's coming to dinner!
The situation is the same as I described above, but with more thrill.
The question mark is not necessary in this case.
Savvy