Caffeine, coffee, tea is actually probably quite good for you, overall, certainly not in terms of harm.
I’m not aware of any evidence that caffeine is bad for you if you have diabetes. I suppose where that comes from is that people think, well, you pee a lot when you’ve got diabetes. And caffeine, it is a diuretic, it makes you pee even more.
But peeing a lot with diabetes means your diabetes is out of control, and you need to get it under control, and that won’t be anything to do with the caffeine in your diet.