When is "food" a countable noun and when is it uncountable? Why?
It is an uncountable noun, because it does not have plural form.
Countable nouns are those, which can be used with numbers and have plural forms.
For example "cookie" is a countable noun because you can say: "five cookies"
Food is an example of uncountable noun because you cannot say "four foods". It is a general noun like money, love, etc.