I think you might be misinterpreting the statement or be unsure of what is meant by the terms 'risk of ' and/or 'risk factor'.
To say that something 'increases the risk for' something else means that that first thing makes it more likely that the person will experience the second thing than they would be if they were not exposed to the certain thing. For exanple, we know that overeating will increase your likelihood of becoming overweight.
A 'risk factor' is something which is present in the person's body or environment which indicates that a certain thing is more likely to happen. Risk factors for diabetes are genetic predisposition, poor diet, being overweight, and a number of other things.
Mental health issues can probably be considered a risk factor for diabetes because things like depression, anxiety, and so on can all change the ways people eat and the amount of activity that they get. Additionally, some medications for psychiatric conditions have a side effect of interfering with the patient's blood sugar levels...frequently, in fact, this creates carb or sugar cravings.
On the flipside, however, mental illness sometimesdoes settle in after the diabetes does. When left to its own devices, diabetes can work havoc on its' surfferers' bodies and keep them from doing many of the things they want to do. This is itself can be depressing; and even under the best of circumstances, it can be stressful to have to monitor your blood sugar levels more carfefully than other people usually do. This kind of thing can get tedious, and the 'Why me?' question often comes into play. The link between diabetes and mental illness is in how one affects the other. When your brain isn't working right, you either aren't inclined to take care of yourself or sometimes don't even know how to do so. Diabetes is becoming more and more common in the Internet Age because....surprise..... people just don't know how to, cannot, or sometimes even will not take care of themselves anymore. In the end, a person's mental health status affects their risk factor for ANY OTHER medical condition. It all comes down into how well they can and do take care of themselves.