Antonius is correct. Excess sugar in itself doesn't cause Type 2 diabetes but can contribute to obesity and/or liver damage which *can* be a factor in developing Type 2. Other factors can be being not getting any exercise, age and other things including race.
Carbs get converted to glucose and the pancreas now has problems making enough insulin to regulate the use of this glucose in your blood. If you have Type 2 Diabetes then yes, you need to pay attention to how many carbs you put in your body and the type of carbs you're eating. Bad carbs = refined sugar, anything made with flour, crisps, processed stuff effectively. Good carbs = fibrous stuff - most vegetables, whole grains, beans etc.