There's a funny scene in the first Hobbit movie where Ori complains "I don't like green food." while he's at Elrond's table in Rivendell. (It's a bit throwaway in that he's seen eating salad at Bilbo's house. But elven lettuce is different from hobbit lettuce, natch.) Dwalin asks where the meat is, and then we get onto Kili flirting with elves, naming the swords and Bofur jumping on the table to liven up the feast.
Some have taken that as an indication of elvish vegetarianism and assertion of dwarven meat preferences. There's also a few writers who don't believe that elves are strict vegetarians, but were succumbing to prejudice and playing a trick on the dwarves by only serving vegetable dishes. I haven't gotten a good look at the dishes served, but the food flung at Bofur on the top of the table seemed to be vegetable matter or bread, including the splat of mashed potatoes at one point.
I certainly think that a set of dwarves who just faced down three trolls and then raced a pack of orcs and wargs after over a month on the road (10 days to Bree and another 30 to Rivendell) would be much more appreciative of some protein and fresh bread than any amount of greenery. They'll have had enough of that along the way.
But in the long term, what would dwarves eat? What can they cultivate in their mountain strongholds?
Erebor of old traded much with Dale and possibly the Greenwood. But Erebor, in the grand scheme of things, was a fairly short-lived stop in travels of Durin's folk. Khazad-Dum closed its doors to the outside when Eregion fell in the middle of the Second Age, and really didn't emerge (though they fought in the Last Alliance at the end of the Second Age) until the balrog Durin's Bane chased out all the dwarves about 3 millenia later (1980 of the Third Age).
So dwarves had to have developed some sort of cavern-based agriculture. (Tolkien also stated that dwarves didn't really keep livestock. I expect he thought they ate rocks.) My thoughts center on two things: fungi are AMAZING, and aquaculture likewise doesn't require sunlight. Erebor in specific had the River Running coming down the side of the mountain, or out the main gate, depending on your artist, and at the very least is a tall (11,000 foot volcanic mountain) enough peak to have permanent glaciers on top, with small streams coming down through most of the year.
So, barring some high-altitude mountain-side terrace farms (which I really shouldn't discount, but access from the interior would be a problem), the dwarves probably cultivated fish in underground streams and ponds, and caves and caves full of fungus. It would also solve the waste problem. Though, as good engineers as dwarves must be, I'm sure several of them have addressed plumbing, waste removal, waste sterilization (excess heat from the forges, perhaps) and all the attendant issues long ago. Getting all of that infrastructure up and running after a dragon destroyed it all would have been a task beyond thirteen dwarves and a hobbit in the immediate aftermath of the dragon's death. (Nevermind getting side-tracked by the Search for the Shiny... I mean, Arkenstone.)
The other option would have been simulated sunlight in farming caverns. The Valar had certainly paved the way: Aule, the Maker of the dwarves himself had crafted the first lamps of the world, and while your everydwarf might not have that sort of skill, dwarven magic and runecrafting might lend itself to artificial light sources, some of which might be used in interior agriculture. Which would open up the possible food sources endlessly... at least plantwards (More greens for dear Ori.)
There's a few writers who explore hobbits love of mushrooms: one of my favorites of those is
A Passion for Mushrooms by Chrononautical, wherein Bilbo finds an entire cavern full of a rare mushroom within Erebor, and happily cultivates them. It also has a scene of Fili imbuing a crystal with light to be used as a light source. I've seen a couple of fics that refer to fish in an underground stream or river, and even one that refers to the pink river dolphins as guardians of one underground river. (The dwarves don't eat the dolphins, but the dolphins sure do eat intruders!)
It's one of the points of contention that authors sometimes explore in the aftermath of the Battle of Five Armies: the fight to feed a growing population of dwarves, but its certainly within the realm of possibility, at least once the dwarves settle in and stop getting attacked by ever goblin or orc from there to Mordor.