In Thailand, when visiting someone who you haven't seen in a while or who lives far away, you might take a gift. Usually people give something produced locally, like some famous or well known local food. If you don't know what to bring then fruit is usually good. No one will be offended if you don't bring anything.
If you are invited to dinner at someone's house you are not expected to bring anything unless the host asks you to. Food is not expensive so most people just go and then thank the host afterwards.