There are so many subtle differences and I don't think one can summarise these differences in a set of simple rules.
- When referring to food in general, 食物 (edit: or 食品) can be used. Note that 食物 is a compound word, which literally means "something (物) to eat (食)". Examples: 食物安全 "food safety", 红十字会正为地震灾民分发食物 "Red Cross is now distributing food to the earthquake survivors". In modern Chinese, the character 食 in 食物 is not a standalone morpheme. It is standalone in classical Chinese, though, and this classical use of the word "食" still remains in a few terms (see "cuisine" below).
- When referring to food prepared by an organisation (e.g. a restaurant or a school meal supplier), 食物 (edit: or 食品), 菜, 饭菜 or 饭餐 can be used. However, there are many exceptional cases that are hard to summarise. For instance, on one hand, even rice-based foods are provided by some McDonald's restaurants, one wouldn't use 饭菜 or 饭餐 as an umbrella term for the food offered by the franchise. On the other hand, even if a usual restaurant (fast food shops excluded) does not offer any rice (饭), one may still call its food 饭菜.
- When referring to the food prepared by a specific person, it is more customary to use 菜 or 饭. The two words are usually interchangable, but 菜 is used more frequently. Examples: 他做的菜很美味 (the food he made was delicious), 她很会做饭 (she cooks very well).
- When referring to catering, since not only food but also drinks are provided in catering services, unless you want to exclude drinks, 饮 (drinks) and 食/餐 (food) are used together to form the compound words 饮食 or 餐饮. The terms 食物, 饭菜 or 饭餐 can also be used, but 饮食 or 餐饮 are more customary and the word "catering" itself should be translated as 饮食 or 餐饮. Again, 食 or 餐 are not standalone morphemes here. Also, note the character orders: you must write 饮食 or 餐饮 but not 食饮 or 饮餐.
- When referring to diet, use 饮食 (but not 餐饮). Again, since you not only eat but also drink, 饮 and 食 are not standalone but used together.
- When referring to cuisine from a specific region, 菜 is definitely the most customary word for "food" (四川菜、日本菜、韩国菜 etc.). [Edit:] In many circumstances you may also say 菜式 in place of 菜, e.g. both 我喜欢法国菜 and 我喜欢法国菜式 mean "I like French cuisine" [end of edit]. 餐 is also valid when a Western country is mentioned (e.g. both 法国菜 and 法国餐 may refer to French cuisine), but seldom used if you refer to other countries or regions within a country (therefore, 四川菜, not 四川餐). At any rate, if you mean a specific dish, use 菜 (edit: or 菜式) instead of 餐, because 餐 implies a meal. Example: 左边这碟是法国菜, 右边这碟是意大利菜 "the dish on the left is French; the one on the right is Italian".
- If you mean cuisine in general (with no specific cultures or cooking styles in mind), the word "cuisine" is 美食 (edit: or 菜式) in Chinese, literally meaning "fabulous food". Example: 我们提供世界各地美食 (edit: or 我们提供世界各地菜式) = "we offer cuisines from around the world". (Here, the character 食 alone means "food", so the usage of 食 is partially classical Chinese. Yet we cannot say 我们提供世界各地食 with the character 美 omitted. So, unlike the case in classical Chinese, the character 食 here is still not a standalone morpheme.)
If you mean meals, use 饭 or 餐. There are various similarities and differences between the two.
- When referring to breakfast, lunch or dinner, etc., both 饭 or 餐 can be used. E.g. 你吃了早饭没有？and 你吃了早餐没有？(Have you had your breakfast yet?) are perfectly fine questions.
- 餐 in some occasions is more formal. On a food menu, "breakfast" usually reads 早餐 but not 早饭. Both 餐桌 or 饭桌 mean "dining table", but "table manner" is 餐桌礼仪, not 饭桌礼仪. Also, if the character for "have/eat" and the character for "meal" are used adjacently, the verb to use depends on the character used. For 饭, use 吃饭 or (less frequently) 用饭; for 餐, use 用餐 but not 吃餐.
- When the time of having meal is unspecified, it is customary to say 饭 instead of 餐. Example: 你吃了饭没有？("Have you had the meal yet?") One may ask 你用过餐没有？for the same purpose, but 用餐 is much more formal than 吃饭 (imagine a butler asking his master the question when the latter is back to his castle).
- To say one is full, one may say 吃饱饭了 (or simply 吃饱了 or better, 饱了), but never 吃饱餐了.
- For festival meals, in general the character 餐 is used. Example: 圣诞大餐 = Christmas dinner, 感恩节大餐 = Thanksgiving dinner. In a related note, the sacrament of Holy Communion is 圣餐 in Chinese.
Note that 餐 is also a quantifier for meals, so its use may sometimes confuse non-native speakers. E.g. in 这餐饭是圣诞大餐 (literally "this meal is Christmas dinner"), the first 餐 is a quantifier for the word 饭 (meal), while the second 餐 refers to a meal.