Yes, lacking of Vitamin D is one of the reason for eye twitching. Since Vitamin D is fat-soluble vitamin that play an important role for maintaining several functions in the body such as calcium absorption. If you lack of vitamin D, you may can't absorb as much calcium as you need which will further lead to weaker bones and possibly eye twitches. So, take more food with all kinds of vitamins.
A deficiency in magnesium could result in eye twitching. Eye twitches occur when the muscles in the eyelid spasm. It ususally lasts for a few minutes in one eyelid. One role of magnesium is to keep muscles functioning properly, including muscles that control eyelid movement. The eye would be twitching if you do not intake enough magnesium. An adult needs 310mg to 400mg magnesium each day on average. You should increase your magesium intake through diet or daily supplement.
Eyelid twitching also can be called "eyelid tremor, may be because of the lack of rest and sleep, anemia or wine and tobacco excessive. On the other hand, it may also be caused by eye disease, such as myopia, hyperopia, astigmatism, conjunctivitis, keratitis, etc. Healing method on the one hand to pay attention to rest, if serious word can be in under the guidance of doctors take calm apply drugs. The solutions, are generally as follows, pay attention to rest, and if you are really serious, you had better take some calm apply drugs under the guidance of doctors. Of course, if you want to choose vitamin, then vitamin B1 is so good for your eyes. In addition, you must pay attention to rest, and avoid causing eye fatigue, and i wish you recover at an early date.