Methane gas (CH4) is a potent greenhouse gas that traps 20 times more heat than Carbon dioxide gas (CO2) does.
If kitchen waste is composted at a municipal compost site, then materials decompose aerobically, without producing much methane gas. If kitchen waste is dumped in a landfill, then materials decompose anaerobically to produce methane gas, which will be collected via pipes and used to generate electricity. If kitchen waste is combusted at a municipal co-generation power plant, then electricity and heat will be generated.
If aerobic composting is not properly managed at individual residences, pockets of anaerobiosis will form, and this will give rise to methane emissions into the atmosphere. If it is properly managed, the compost pile will produce carbon dioxide gas without generating electricity.
Either way, it is better if kitchen waste is processed at a central location.