When it comes to coffee specifically, if you listen to the studies about coffee, it's some panacea full of anti-oxidants. However, it's a stimulant, it increases cortisol (stress hormone). Stimulants generally makes the body prioritize immediate energy spending over regeneration/healing. There's been a study claiming that caffeine decreases neurogenesis, which should negatively impact both long-term memory and mood.