From Dragon Eye Atlas
Fungiculture is a big part of this, as mushrooms can grow without or with very little light and can be used for food, medicine and the fibers can be turned into fabrics (though not good enough for clothes) and other materials, depending on the species of mushrooms used.
In addition to mushrooms, dwarves have also cultivated a large number of other plants that grow with minimal light that can be provided by torches, magic or bioluminescent animals. These are a constant in most dwarven cities, and have been bred for thousands of years. Many of them are fish, and Underground Farming does extend to algae and water plants feeding off the light given off by fish.
While it allows for food being grown, the efficiency of underground farming is much less than that above ground. It takes about twice as much area to feed a family, and though many of the plants and animals used in underground farming are low-maintenance, and unlike above ground can be stacked vertically in several caves above each other, the workload to feed a dwarven city by underground mining alone is tremendous and one of the reasons why most dwarven cities hold land above ground and use it for farming and trapping.
It should also be mentioned that a dwarven dish made from underground farming will contain quite a few items that other races would not consider food at all - algea, moss, slugs, insects and such - which are high in protein and often taste surprisingly good for those not used to such food.