Contrary to a common misconception, the roast level of coffee beans doesn't significantly affect the caffeine content. The caffeine content is more determined by the type of coffee bean, its origin, and the brewing method.
Generally, lighter roasted coffee beans tend to have a slightly higher caffeine content compared to darker roasts, but the difference is relatively small. The roasting process may cause some loss of caffeine, but it's not the primary factor influencing caffeine levels in coffee.
The type of coffee bean and how it's brewed have a more substantial impact on caffeine content. For instance, robusta beans typically contain more caffeine than arabica beans. Additionally, factors like the grind size, brewing time, and water temperature also play a role in the final caffeine content of your coffee.