Is there a scientific reason for lighting diyas or candles? Well for a start we can assume that there must be some reason for this practice as a closer and deeper look at most other practices reveals that they were guided by some logic or reason at the time these practices existed or were started. So let us try and see if there is some solid reason behind lighting a diya before the deities
Idol Worship: A Perspective
If we go back to the Vedas you will notice that there is nothing mentioned about idol worship. In original Hinduism there was nothing about idol worship as there was nothing about idol worship obviously there would be any mention of lighting candles. Gita says that God comes in all ages if god incarnated only in one age and not in the others it would be injustice to the other ages. God originally did not have a form. When God incarnated then people started to associate them with forms. For example Rama and Krishna were just incarnations of Vishnu. Hanuman started to worship Lord Rama and Gopis started to worship Krishna this took them to the position of god. People got a form to the Gods they worshipped. As God got a form slowly the methods of worshiping them started to be developed. Some temples were also built and people started to visit these temples.
Even offering food to the idols was a custom that started to ensure that the poor in the country get food. The food that was offered to god as later distributed among the poor. The food should be offered to the living and not the idol. This will ensure that a hungry person gets some food to eat.
There is another concept about idol worship. When Vedas were written they gave more importance to meditation and to the ones of human soul with the parmatma (the supreme soul) that controls the universe. In those days people had the time and the dedication to worship and meditate even without an idol. As time passed people started to get distracted and they could not concentrate on something that they could not see or feel. For these people idol was necessary so that they could concentrate and feel faith on something.
The Element Worship
Hinduism is based on worshipping the elements that make up the universe. All the shlokas and the mantras that Hinduism talks about mentions that the universe is made of five elements and that are the eternal truth of life. Our body is also made of these five elements and one day the body will get back to these five elements. The five elements are fire, water, earth and ether.
This is why the pooja thali contains all these elements. Even when god was formless and people worshipped the supreme power these elements were also worshipped and respected. The universe is running in a smooth manner as these elements control it. The day even one of these elements start to behave differently there will be destruction and the universe will end. We must worship these elements so that they do not cause havoc in our lives and the lives of the people we are concerned about.
Formless vs Form
Even today the sages and the yogis who meditate in the Himalayas do not use any idol. They just worship the formless god. The concept is like first we go to a school then we go to a college and then we go to a university. Similarly a person who is new to religion needs an idol to start with his worshipping as he moves to the second level of connectivity with god he does not need the idol any more. People who are seriously into religion will tell you that they feel that god is formless and they basically worship the formless aspect of god. As god is considered formless that is why most religion states that the different religions are basically ways to reach the same destination or goal.
As you get introduced to god you need an idol. You need the physical form for all the other elements that we have mentioned. Fire is thus represented by a diya. This is why it is necessary to light a diya before you start to worship. Some people also say that the ancient temples were very dark and the idol was kept in the darkest corner of the temple. In order to see this idol it was necessary to light a lamp before it and since then the tradition of lighting a diya has been followed.
Another theory about lighting a diya might sound to be the most scientific one. According to this when we are worshipping god it is essential that we concentrate with all the five senses that we have. One of the five senses is the eyes and when we look at the diya all of a sudden attention is captured and we can concentrate more on the idol and the pooja that we are doing.
The Sandhikaal Theory
Sandhi means joining and kaal means time, so sandhikaal refers to the two periods during the day when day and night meet, i.e. dawn and dusk. It is said that the negative energies are most prominent during these two times and hence the aspect of agni or lighting a diya arose which tends to balance this onslaught of negative vibes. Similarly it is advised not to indulge in several deeds and it goes to extent of prohibiting viewing a mirror at evening.