They let you know, usually. They'll say things like, 'wow, I feel like I can tell you anything' or 'I haven't had a conversation with anyone like this for a long time.' Their smile is wider when you walk into the room. Their body language is open. They're more helpful or more talkative with you than usual.
If you've told them something profound, they might thank you for it. Or recall that conversation again sometime in the future.
It's any myriad of things, but most of the time, you just sense it.