As Richard MacCutchan said, you will need to design a Database first to capture the information about each meal each user has had.
Here's a link to a
beginners guide to databases[
^]
Think carefully about the tables you will need and what sort of information you will need to gather.
Next, you will need a program to capture that information - you haven't suggested a language unfortunately. Here is a list of resources for
winforms[
^]
and another list of
asp tutorials[
^] in case you want to do it as a website.
As you've used the word "App" you may want to look at the
CodeProject Android articles[
^] instead.
Finally, you will probably need some way for the User to identify themselves (again - there's lots of stuff on CodeProject and Google), then ask for a suggestion.
You will need to query your database based on the user name (or id). For the "most" and "less" queries you will need to learn about "GROUP BY" and "COUNT". For the "time" element you will probably need to learn about "BETWEEN" (Hint: Don't use an exact time)
That's an awful lot to be going on with. So give it a go, and come back if you hit any specific problems.
Good luck.