First, there are 2 types of diabetes, creatively named Type 1 and Type 2.
Type 2 is the type you are most likely referring to in your post. People with a family history of Type 2 do need to be extra cautious, and this means eating healthy, keeping your calories down, and exercise (something all of us should do, really, but extra emphasis with T2, either diagnosed or potential). Type 2 is not usually treated with insulin at first, because the pancreas still creates insulin, but your body's management of blood sugars isn't as efficient as it should be. It can, however, lead to you being insulin dependent. Eating sweets and drinking sugary drinks does not cause Type 2 per se, but their abuse, along with a generally unhealthy can lead to it. If I'm not mistaken, the primary issue here is the genetic propensity for it.
Type 1 is insulin dependent from the start. This means the beta cells in your pancreas have stopped functioning completely, so your body no longer produces insulin. From what I understand, there isn't a genetic, or family history, component to Type I, but doctors aren't really sure what causes it. Sometimes, the first manifestation of Type 1 can come after a serious illness, but I'm not sure about the causal relationship there. In this case, neither diet nor exercise is the cause, but just luck of the draw. People with Type 1 can eat almost anything they want, but they have to take insulin to process the blood sugars since their body produces none.
My daughter is currently 22, and was diagnosed with Type 1 at age 11. This is why I know something about diabetes--as a parent, I've had to learn.