The Gemara in Masechet Pesahim (101) tells that Abayeh was once with his Rabbi on Friday night, and his Rabbi urged him to recite Kiddush and eat in the place where they were. He warned Abayeh that by the time he returned to the place where he was lodging, the candle there will likely have gone out, and he would thus be unable to eat there. Since Kiddush must be recited in the place where one eats, the Rabbi urged Abayeh to recite Kiddush at the place where they were at that moment and then eat there.
This comment seems to imply that the Shabbat meal must be eaten in the place where Shabbat candles are lit, and for this reason Abayeh would have been unable to eat his Shabbat meal at his place of lodging. Others, however, explain the Rabbi’s comment to mean that as a practical matter, people do not enjoy eating in the dark. From a halachic perspective, Abayeh would have been allowed to recite Kiddush and eat in the dark, but since people prefer eating where there is illumination, his Rabbi instructed him to recite Kiddush and eat at his current location.
The Rosh (Rabbenu Asher Ben Yehiel, Germany-Spain, 1250-1327) cites both opinions, as does the Shulhan Aruch, which writes that "some say" ("Yesh Omrim") one must eat where the Shabbat candles burn, and "some say" this is not necessary. There is a rule that when the Shulhan Aruch cites two views in this fashion ("Yesh Omrim…Ve’yesh Omrim"), he accepts the second opinion cited. Moreover, in this instance the Shulhan Aruch writes explicitly that the second view seems more reasonable ("Ve’hachi Mistabera"). Therefore, according to the strict Halacha, one does not have to eat in the place where the Shabbat candles are lit.
However, the Arizal (Rav Yishak Luria of Safed, 1534-1572) ruled that one must eat his Friday night meal near the candles, and this is the view accepted by the Kaf Ha’haim (Rav Yaakob Haim Sofer, Baghdad-Israel, 1870-1939). The Kaf Ha’haim writes that if somebody wishes to eat outside on the roof or on the porch, he must light the Shabbat candles in that location, using a lantern or other device to protect the candles from the wind.
This Halacha is very relevant nowadays. A person should not light Shabbat candles in the kitchen and eat in the dining room, or vice versa. People who spend Shabbat in a hotel should try, if possible, to bring two tea lights and light them on the table in the dining room where they will be eating. On Sukkot, one should try to light the candles in the Sukka. Although the strict Halacha, as we have seen, allows lighting Shabbat candles in one place and eating somewhere else, one should try to follow the Arizal’s tradition and make a point of eating near the Shabbat candles.
Summary: According to the strict Halacha, one may light the Shabbat candles in one place and eat the Friday night meal somewhere else, though one should preferably eat near the Shabbat candles, in accordance with the tradition of the Arizal.