Because diabetes is linked to blood sugar levels, the condition is often misunderstood as being caused by eating too much sugar. Type 1 diabetes (which is controlled by insulin injections) is the result of the immune system turning on the insulin-producing cells in the pancreas and has nothing to do with diet.
Type 2 diabetes is also linked to poor insulin production but this type is more common if you're overweight. High sugar levels can therefore be a risk factor for developing type 2 diabetes but it's got more to do with being overweight and with one's sugar consumption per se.