‘Speak of the devil’ means that the person you’re just talking about actually appears at that moment.
Examples:
“Did you see Richard today? Oh, here he comes! Speak of the devil.”
Or
“Hi Tom, speak of the devil, I was just telling Sara about your new car.”
This phrase is a lighthearted way of referring to someone who has unexpectedly come in when being talked about, however, prior to the 20th century, it wasn’t a lighthearted one. Originally, the phrase was “Speak of the Devil and he will appear” and it was meant to warn people not to talk about the Devil. It was widely known and used by the mid 1600s.