If he's "sneaking around" to do it and his wife is not aware of it, I agree with you that it's problematic and she'd be right to be very upset when she (inevitably) finds out.
If his wife knows that he has this online friend he talks with a lot, however, I think some of the responses here are a bit harsh. In principle, having a good friend (or better still, good friends), whom you can trust and confide in and share things with on a regular basis, is a good thing. It would be unhealthy for someone to rely exclusively on their partner for their emotional needs.
I would say there are three questions here:
- Frequency. Talking every few days instead of only every couple of weeks can be a good thing in developing close friendships. Talking for hours almost every single day? That's a lot of mindspace and emotional attention to direct away from your marriage and work, especially to someone you never see in real life.
- Transparency. To what extent does his wife know he's talking with this friend, what those talks are like, and how long? It's perfectly OK to share something personal with a friend without delivering a detailed report of what you're talking about, but your partner should have an accurate impression of the general nature of the friendship. If you squirm when you imagine your wife finding out what you're saying to the other, that's the sign of a problem.
- How "flirty"? You mention a couple times, SOMP, how the two of you "flirt" and "tease" during these convos. That seems like it a clear red flag. Depending on the relationship and the culture, it can be a bit more, or a lot less, acceptable to act a bit flirty when you go out and such; but in lengthy one-on-one online conversations it's easy to develop a sense of intimacy where being "flirty" can escalate quickly.
So that all seems plenty of reason to worry and do some soul-searching. But if you are able to steer this to a friendship that remains a friendship rather than becoming a sexually charged online infatuation, and that involves regular conversations but not hours every day that detract from making the rest of your life (marriage, work) function, I would think of that as a positive thing. I think the notion of an "emotional affair" itself is problematic.. it's so strange, to me. I'd never even heard of the phrase until it came up over and again here on this forum; it seems a very American thing. (I'm Dutch). The idea that, once you're married, it should be taboo to develop any close emotional connection with anyone of the other gender seems a little... creepy to me. That said, it sounds like you definitely have the three questions above to consider.