Lots of stuff
Many ingredients in energy drinks can cause diarrhea
; different people have different sensitivities, so it’s hard to say which one actually causes it in any individual.
According to sports physicians i've talked to, the best energy drink is water. One team doctor told me that those big energy drink barrels you see on the sidelines at games are usually full of water, not the advertised product.