Coruscant is entirely covered by a city, thus there isn't any land for farms (or if there are some farms, there wouldn't be much space for them). How does this planet with a population of billions get enough food to feed its sizable population? Do they import it all from offworld (something that would take a lot of ships)?
The Ultimate Star Wars factbook confirms that Coruscant imports its food (along with all of its other consumables) from off-planet.
Exhausted of all natural resources, Coruscant is entirely dependent on outside support to survive
There are various mentions of hydroponic farming although with a population of trillions, you wouldn't get very far unless vast areas of the planet were given over to it.
Orbital traffic encloses the planet like electrons around a nucleus, delivering food and supplies, ambassadors and tourists.
Palaeontologists believe most of Coruscant was already paved over by the time interstellar flight became common. Such rampant overpopulation forced the inhabitants to develop the first atmosphere scrubbers, hydroponic farms, delivery pipelines, and recycling plants.
This does not seem to be discussed much in canon, but I can see two plausible possibilities.
They can grow it on-site
Coruscant is an entirely urbanized planet. But this does not mean that the entire planet is occupied by organic entities. Rather, the entire surface is covered in buildings. A great deal of the planet is probably power, storage, and related infrastructure, as opposed to housing (though the population is still undoubtedly enormous). A great deal of that structure could be devoted to agriculture. Agriculture requires energy (which is cheap in Star Wars), and labor (much of which is probably automated or done by droids). Of course, it also requires circulation of raw materials. Both atmosphere and water, which are essential for plant respiration, are manually controlled on Coruscant:
The days in which Coruscant could be viewed in any sort of natural state were dead and gone. The capital city had expanded over the centuries, building by building, until it wrapped the entire planet. Forests, mountains, bodies of water, and natural formations had been covered over. The atmosphere was filtered through oxygen regulators and purified by scrubbers, and water was gathered and stored in massive artificial aquifers.
The Phantom Menace
Food could easily be grown in hydroponic solutions, or whatever the Coruscant equivalent is. The minerals necessary for plant growth could come from mining and repurposed waste.
Don’t forget, Coruscant is quite an advanced planet: they have a great number of options at their disposal.
They can get it from other planets
In some previous Legends works, Coruscant imported large quantites of food from nearby agricultural worlds, and this remains a viable option in current canon. Space travel in Star Wars is cheap and fast. Assuming one is going along a hyperspace lane, one can get from place to place quite quickly. Travel times between planets in Star Wars generally seem to range from minutes to days.
We can get an idea of cost as of the time of the Galactic Empire. Han charged Luke an absurd amount to avoid "Imperial entanglements," which Luke said was nearly enough for a ship.
HAN: Well, that’s the trick, isn’t it? And it’s going to cost you something extra. Ten thousand in advance.
LUKE: Ten thousand? We could almost buy our own ship for that!
According to Wookiepedia, in Star Wars: Everything You Need to Know, it is revealed that Luke sold his landspeeder to obtain the 2,000 credits that Obi-Wan had on hand. So a ship (though possibly a poor one) costs somewhat more than five times the cost of a landspeeder, a transport which any poor moisture farmer can afford. Similarly, Qui-Gon offered Watto 20,000 credits for a hyperdrive in The Phantom Menace, though we cannot discount the possibility of a recession or currency revaluation. The cost of space travel is not, it would seem, hugely different from that of land travel.
Thus transportation of food from nearby planets dedicated to agriculture is quite feasible.
Assuming that energy for lighting is not an issue, you could easily create vertical hydroponic farms. Meat can also be grown in vats. A food production facility on Coruscant would probably look like this, but with a lot of artificial lights, and be a lot taller, or else be replicated through a 100 floor factory.
It's true that Coruscant could be supplied with air scrubbers and a constant influx of food, but it's irrational to think that these resources would be distributed fairly, especially considering that one of the main focuses of Star Wars is the rampant corruption in the Galactic Republic.
We know that Coruscant was divided into thousands of levels, but at the same time, based on how cities grow and shrink, it seems reasonable that at some point, some of these levels may have become somewhat abandoned, or perhaps not distributed on an entirely planet-wide basis - if you carved a planet up uniformly, the crust would begin to collapse in on itself, so the levels would have to have been distributed around the planet.
Some of these levels could have been abandoned or depopulated, and while a few of these areas would certainly have become hotbeds for criminal activity in the Coruscanti underworld, others could have been converted into vast underground farms or hydroponics facilities - it doesn't necessarily take to much space to grow food if you are packing the crops in, especially with genetic engineering. This would also alleviate the difficulties of deep-level transport somewhat, while still being able to reasonably supply the surface.