The caffeine in coffee stimulates the production of irritating acid in the stomach  But darker roasts of coffee, produced by roasting the coffee beans longer, contain more N-methylpyridinium (NMP) than lighter roasts, and NMP tends to suppress production of acid in the stomach
Ttherefore if you drink caffeinated coffee, darker roasts will irritate your stomach less than lighter roasts
Do lighter roasts of coffee have any important health benefits that darker roasts of coffee lack.