Calories per day are personalized to every person's specific situation (or should be at least). If you don't mind providing me with some information, I can give you a safe calorie range for you. If you don't feel comfortable giving personal information in this forum (which I completely understand), feel free to send me a message. I need at least your height and weight, but height, weight, age, and activity would be best. You can tell me whatever you feel comfortable with :o)
Gaining weight can safely be done by doing a few simple things. Increasing your weight bearing activities (such as lifting weights or resistance training) will increase your weight through muscle mass. As with any exercise routine, make sure you are drinking plenty of fluids and are healthy enough to participate.
As far as diet changes are concerned, eating higher carb foods made (from whole grains and fruits, especially) will help. I know this sounds counter-intuitive regarding diabetes care, so this particular change will be up to you. You know your own diabetes best and how it reacts to certain foods, so you will be best able to judge if higher carb foods are an option. Of course, I don't necessarily mean eating your entire day's worth of carbs in one meal, just slowly increasing your current intake. I can give you more specifics once I have a little more information about your needs.
You can also increase your intake of healthy fats. "Healthy" fats are mainly omega-3 fats and foods low in saturated and trans fats. Omega-3s can be found in things like fatty fish (tuna, salmon, halibut, etc), avocados, flax seed or chia seed, nuts, and other foods. There are now eggs and other foods made with Omega-3s. Some whole grains even have them added in. While lean meats (round/loin cuts, chicken, turkey, and white fish) don't have omega-3 fats in them, they are also a good option for increasing calories in a healthy way. The same goes for low-fat dairy products. A small word of caution for consuming dairy products - they can be very high in fat, cholesterol, and sugar so make sure you read the label. Dairy products made with 2% or lower milk-fat are best. If you are currently drinking skim milk, you can stick with that; you can increase calories in other areas.
As always, make sure you are getting plenty of fluids throughout the day. If you drink caffeinated beverages, make sure you drink something that is caffeine free/calorie-free to rehydrate yourself. Water is always a great option :o)
Those are the basics. If you have more questions or want more information about something, please let me know. I'm happy to help! :o)