Let's say I have a problem with a computer, so I ask a friend to come to my place to help me fix it, which he does. Do I say thank you for coming or thank you for coming in. Is there any difference between come and come in in the context?
There is a difference and come in is not natural in that context.
There are a number of adverbs and prepositions that can follow come and they alter its meaning; sometimes subtly, sometimes dramatically.
In this case, the difference between thanks for coming and thanks for coming in is subtle.
Thanks for coming works in this context. It is applicable to situations that involve traveling to someplace. There seems to be some kind of rule about the distance traveled, though, because I wouldn't thank my colleague for "coming" to my desk. Instead, I might say, "thanks for coming by" or "thanks for coming over here."
Thanks for coming in would work in similar situations, but not this exact one. Come in has a couple of uses. It can be used to describe entering a space. It can also be used to describe traveling to a place, but only specific kinds of places.
Probably the most common place to come into is the office or work. If I'm sick, I might tell my manager, "I'm not coming in (to work/to the office) today." If I was supposed to have the day off, but I agreed to trade shifts with someone, my boss might say, "Thanks for coming in on such short notice."
This also works when describing coming to see the doctor, or the dentist, or any place where you have an appointment.
On the other hand, if my wife comes to visit me at my office on her lunch break, she is not coming in (she is coming over, coming by, coming to see me).
It's not entirely clear to me when we can use come in. It's something like when you're coming to the place where you work, or to a place where someone else works and you have an appointment with them.