Growing up we kept a compost pile. We'd keep food scraps in a bucket in the kitchen, and dump them into a fenced-in pile in the backyard along with yard waste. When that pile was full we'd start a new one, and after a year or two the old pile would have turned into dirt we could use in the garden. While it smelled kind of bad, and would have bugs, we liked that we were doing our part for the planet.
Unfortunately, in retrospect I think our piles were mostly decomposing anaerobically, and it would have been better to just throw things out.
There are two main kinds of decomposition you can get in a compost pile: aerobic or anaerobic. Most advice you find is for aerobic ("with air") composting: water your pile, turn it every couple weeks with a fork, include branches and similar things that keep air pockets. Aerobic composting gives off carbon dioxide (CO2). If you don't do these things and just let it sit, however, you get anaerobic ("without air") composting, which gives off methane (CH4) instead.
Methane is a much more potent greenhouse gas than carbon dioxide; in calculating "carbon dioxide equivalents" (CO2e) people usually count it as 25x worse. Landfills decompose mostly anaerobically, but modern landfills capture and burn much of the methane, converting it to carbon dioxide. Even if your trash currently goes to a landfill without capture technology, fixing a smaller number of centralized sourced is much more practical than many backyard piles.
Industrial composting doesn't have these problems: it's generally well managed. Either they make sure to give it enough air to facilitate aerobic decomposition, or they run anaerobic digestion sealed to capture the methane.
If you don't have industrial compost at home, though, could the benefit of not using landfill space make backyard composting worth it? There was a period when environmentalists were raising awareness around the idea that we would run out of space for trash:
Garbage, garbage, garbage, garbage
What will we do when there's no place left
To put all the garbage
—Garbage, Bill Steele, 1969
This wasn't actually a serious issue, however. While there have been regional shortages, the problem is one of needing to open new landfills, not a lack space. The actual amount of space you need for trash is tiny. The US produces about 260 million tons of trash per year, about one square mile  if you're trying to minimize land usage.
So from a modern environmentalist perspective, what matters is the effect on climate change. If you're not maintaining your piles, consider either starting taking care of them or just throwing things out instead.
(Whether composting is worth altruistic attention is not something I'm looking at here, though I suspect it isn't.)
 Figure two cubic yards per ton and 260M tons is 520M cubic yards. At 500ft thick that's one square mile. Most landfills aren't nearly that tall, but that's because we have plenty of space and don't need to build them up so much.