Diabetes causes the levels of sugar in the blood to rise, while treatment for diabetes aims to bring levels under control again. This means that there are likely to be some fluctuations in blood sugar levels for a time, particularly when you first start treatment.
These fluctuations can affect the tissues of the eye and can cause fluid to pass into the lens, making it swell and become thicker. A thicker lens can only focus on things close-by, so you become short-sighted. The problem may come and go, but if it persists for more than a month, you should be re-examined by your doctor.