I've had kidney stones for years and was always told it was caused by too much Uric Acid in the body.
Uric acid stones can be maintained with a drug called Alpurinol .. are you on that? There are other types, too, the most common being calcium oxalate and those are made by too much calicum produced sometimes by the parathyroids not working right.
Yes, the Vitamin D is great and any pain level should get better .. did he suggest Magnesium and low oxalate diet at all? Have you had your stones analyzed?
Medullary Sponge Kidney w/calcium oxalate stones
see that community (MSK) cause there is a recent post about Vit. D. defficiency I just answered over there ... that member said her kidney pain is now gone!