Let's talk about coffee roasting.
Disclaimer: this is a basic overview of the roasting process and how the beans change, it's not a definitive guide to roasting.
What defines a light / medium / dark roast? There are no universal standards in the coffee world as to what defines a roast level, it's just a measure of how dark the bean is. Every roaster will have their own standards and many artisan roasters have moved away from the light / medium / dark spectrum to focus on the tasting notes and let the high quality bean speak for itself.
Which is better? That's up to personal preference. Large chain coffee shops generally stick to darker roasts, because it helps them mask imperfections in the lower quality, less expensive beans. Lighter roasted coffee has a more complex and unique flavour profile.
What about caffeine? Lighter roasts have more caffeine. The chemical reactions within the beans as you go darker causes the caffeine levels to go down.
What about acidity? First and foremost, acid and acidity are not the same thing. As a rule of thumb, almost every coffee on the market has a pH of ~5. Acidity is a tasting note. There are two main groups of acids in coffee, chlorogenic acids and quinic acids. Chlorogenic acids are the antioxidant acids which breakdown in the roasting process and develop the more complex flavours of lighter roasts. Chlorogenic acids transform into quinic acids throughout the roasting process. Quinic acids are responsible for the sour notes in coffee, making it less desirable.