Hey WS - welcome to the fray!
The question you are asking actually does not make a lot of sense. It's a contextual thing.
'Food' persay, did not evolve. Life evolved to make use of the resources that were available to it. Initially, these resources consisted of non-living matter. Chemical soups and so on.
However, as life became more prominent it began to evolve to make use of this very convenient energy source that had all of the necessities - other life.
Some of these life forms that were being consumed were 'better' or 'more nutritious' then others. Because of this the predatory life forms evolved 'tastes' so that they would prefer to consume these 'better' life forms.
This is why I believe it is not correct to be asking 'How did food evolve?". We (and all other life forms) evolved to find the things that are 'best' for us the tastiest. Sugars and fats are abolutely essential for our survival (energy). This is why they are so attractive to the human palette.
Once you change your world view on the whole food question, it becomes pretty obvious (again, in my opinion) that the question does not make a lot of sense.
Hope this helps!