Many types of diabetes have some genetic element but it may be stronger for type 2 than for type 1.
'if you have type 2 diabetes, the risk of your child getting diabetes is 1 in 7 if you were diagnosed before age 50 and 1 in 13 if you were diagnosed after age 50. '
If you have an identical twin with diabetes then you have a 75% chance of also developing it. It is difficult to separate out environmental factors (most people develop their eating and exercise patterns for example in the family)
MODY is very strongly genetic, some of the specific MODY genes have been discovered. There is a very specific inheritance pattern. If you have a parent with it then you have 50% chance of developing it.
People with type 1a (autoimmune) seem to have a specific genetic predisposition but it takes an environmental factor to actually trigger the condition. ( a virus, the time of the year, lack of vit D, infant feeding patterns, immunisation are amongst the suggested culprits). 'If you are a man with type 1 diabetes, the odds of your child getting diabetes are 1 in 17 If you are a woman with type 1 diabetes and your child was born before you were 25, your child's risk is 1 in 25; if your child was born after you turned 25, your child's risk is 1 in 100. Your child's risk is doubled if you developed diabetes before age 11. If both you and your partner have type 1 diabetes, the risk is between 1 in 10 and 1 in 4' . If you have an identical twin with diabetes then you have a less than 1 in 2 chance of developing it.(inheritance figures in quotes from the ADA website)
There are also people with 1b (idiopathic/unknown origin) and nobody knows why they develop it!
In addition some cases of diabetes are caused by trauma, drugs or another illness, for example people with too much iron in their blood can develop diabetes.