There is no scientific reason that can justify a change in eating habits during solar or lunar eclipses. It is just an ordinary superstition. However, if it is undertaken by someone with a health disorder who cannot afford to not eat, it can be a dangerous superstition.
Eclipses are associated with bad omens in many cultures. The origins of these superstitions can be traced back to a time when human beings lived in tribes under the open sky and the stars were vastly more important then they are today. These days, we can tell time using clocks, we are told of changes in weather and seasons by televisions, we find out what we need and what we should avoid through public service announcements on media outlets.
But once upon a time, such knowledge was not very easy to find. It was only by looking at the sky that human beings could tell what time of the year it was. Only by scanning the sky for clouds could we tell if it was time to move to higher ground (floods usually meant death by drowning). Only by looking at the position of the sun and the moon could we tell what time of the day it was.
Over time, humankind began to define its place in the universe using the sky. We began to think that we are special because nature is so nice to us that it actually gives us signals about what to do when. To this day, this illusion remains in our minds — that we are special and all that is happening around us is somehow nature’s way of directly communicating with us.
So imagine a happy human looking at the sky, content in the thought that he can always reply on the sun and the stars to make sense of his life. He begins to think of them as gods and he even begins to see the shapes of gods and deities in constellations of stars.
Then, one fine day, a black shadow envelopes the sun. Darkness falls in the middle of the day. All sense of order gets thrown out of the window and human beings assume that there is something wrong with nature, that the gods are sad, or angry, or dying, or fighting. And then, because the human being is so taken by his own sense of importance, he thinks he can do something to ward off this unseemly state of affairs.
This is why human societies all over the world have elaborate stories associated with eclipses. In India as well as in Vietnam, Greece, Korea, there are similar mythological accounts of eclipses.