People use this phrase when:
- They're excited about something.
- They want to tell someone about it.
- They want to build the suspense before they talk about it. (Meaning that they want the listener's excitement level to rise.)
When you say "Guess who I saw", it lets the listener know that you saw someone unexpected and exciting. It's more interesting than just directly telling them who you saw. Here are some other examples of phrases like this:
Guess what I heard!
Guess where I'm going!