Landfilled food waste can generate significant amounts of methane through anerobic decomposition. In a wet boreal/temperate climate zone, typical methane emissions are about 1.4 Kg CO2e per Kg of wet food waste (based on IPCC guidelines and 100-year assessment period). To put this in context, most fruits and vegetables have embodied carbon emissions of less than 0.7 Kg of CO2e per Kg of product at the farm gate (with some exceptions such as greenhouse production). Thus, landfilling has at least twice the impact as the original production. If we produce 1 Kg of some fruit/vegetable at this carbon emission rate and then throw away 20% of that into a landfill without methane capture, we are essentially increasing the carbon footprint of the product by 40%. On the other hand, composting generates little or no methane (less than 1% to a few percent of the initial carbon content is released as methane), and the biogenic CO2 from composting is not counted toward global warming.
Landfills are the largest methane source in the US (see EPA). Among degradable organic matter in landfills, food waste decomposes faster than anything else with more of the methane emissions occurring earlier in the 100-year period, which means higher global warming potential. The EPA estimates that food waste diverted from landfills decreases GHG emissions by 0.82 tonnes of CO2e per tonne of food waste -- presumably accounting for some average percentage of methane capture in landfills (per this report).