It is only used in irony. Some cases include:
1. A person comes round every day, and you find it a little annoying. You say sarcastically: "Hey, stranger!"
2. A family member or friend hasn't been in touch for years. He suddenly calls. You say ironically: "Hey, stranger!"