Bad Coffee
There are a few types of bad coffee. Before I get into this, I will make a disclaimer: I am not saying any of this to be critical of a person who likes a certain type of coffee. It’s all good if you like something, and you should keep enjoying it. Some of this is subjective. Given that, there are also some cups that have objective problems. Here they are in order from farm, to packaging, to preparation.
Bad beans/roasting - This can be hard to detect without some expert training, but there is a range of the quality of coffee cherries that come into a coffee processing station, and a lot of processing before the beans even get to the roaster. Some coffee cherries are not ripe, didn’t form right, or have mold or other problems. Better coffee comes from better cherries that are healthy and ripe. Poorer cherries produce coffees that don’t taste as good. Oftentimes, those coffees are sold more cheaply and then over-roasted so that most of those flavors are burned away or covered up.
Lack of flavor - This often comes from old coffee, or beans that were ground too long ago. As a general rule, coffee can sit unroasted for perhaps a year and still be good. Once they are roasted though, the clock starts ticking. Really good flavors peak roughly 14 days after roasting (sometimes a week or two longer). This time decreases with repeated exposure to oxygen, so if a bag is constantly being opened and closed, that can have a negative effect. Once the beans are ground, things kick to another gear, and you only have a few days before the beans will taste flat.
Staleness - Pre-ground coffee that has sat in package for months risks rancidity due to oxidization of the coffee oils. Really old whole beans can have similar issues.
Poor brewing - This is where you have to go to work! If you have good beans, you try to get the best extraction possible with the equipment you have. The more hands-on your method is, and the better your equipment is, the more factors you can control. For example, a Keurig give you just about no control over your brew. Some machines allow you to select how much water goes through the grounds. However, nothing you can do will bring really old, pre-ground coffee to life. The best you can do is pre-warm the machine to get the water hot enough to get more extraction with less water.
If you are grinding your own beans, the best burr grinder you can afford will help you tighten your grind distribution and prevent coffee that is both sour and bitter (under- and over-extracted at the same time). Then, by trial and error, you can “dial in” your brew parameters to get your ideal extraction. Often, a cheap drip machine will not heat the water as hot as is ideal for full extraction. Therefore, grinding a bit finer will allow better extraction by exposing more surface area to the water and increasing the time it takes the water to drain.