Eating food while wearing shoes is permissible and correct, but taking them off to eat is better, because it is mentioned in the noble Hadith that the Messenger of Allah ﷺ said: "When food is placed before you and you sit down to eat, take off your shoes, because taking off shoes is very comforting for the feet." (Aham Masail / Vol: 8 / Pg: 298)