They are coming after they have had dinner.
They are coming after they have eaten their dinner.
what is the difference between the two sentences and when we use each one of then
The usual idiom in English in terms of meals is to have dinner. That is to say, to sit down at a table and eat dinner. (Or have a fancy picnic on the grass [that is a joke but true]). We had a picnic on the lawn yesterday.
Have lunch, have breakfast, have tea (if you're English), have dinner/supper.
Not "eat dinner". You ask or tell a child to eat his dinner instead of playing with the fork as if it were an airplane. :) Or banging his soup spoon on the table.
There are different usages here with have/eat dinner. And if you are American, and say: What time do you eat dinner? Well, to me, you are marked as a somewhat uneducated speaker or young-er or -ish. Personally, here, for the OP's context, I would probably go with have.... Some Americans will say: We eat dinner at [time]. But, many will refer to that activity as having dinner at a particular time.
Also, if I am a detective, I might say: What time did you actually eat your dinner? If the act of eating is important as someone was poisoned, for example.
Eat dinner is not usually used in terms of general talk of meals. It is only used when the actual act of eating is important: My grandmother has trouble eating dinner as she has trouble with her fork. You might say: Today I did eat breakfast at home (the activity is important) but I usually have breakfast at the office.
So, your first sentence is right for general statements about a meal. Your second sentence (have eaten dinner) might refer to kids who have to actually eat their dinner before going off to play video games. Or some other specific thing.
If adult friends were coming to my house to play cards after dinner, I would use: after they have had dinner.
Gosh, I haven't eaten all day. I must go make the dinner.