Lighting a candle l’ilui nishmas (for the elevation of the soul) of the deceased at his grave is very beneficial for the soul. Rabbenu Bachye explained this in his book (Exodus 25:31), “It is known that the soul itself benefits when lights are lit and it derives pleasure and joy from its light. Once the soul is in a joyous state its joy spreads seeing the soul itself perceived as if it were hewn out of the light of man’s intelligence. The relationship between light and intelligence is the reason why the soul is drawn after light which is of its own kind although basically the “light” of our intelligence is essentially physical in nature, whereas the light represented by the soul is of a spiritual nature. This is why Solomon was able to compare a lamp (physical light) to the soul (spiritual light) when he said “the soul is the light of the L-rd” (Proverbs 20:27).
It is customary to light the memorial light on the anniversary of the death (yartzheit) in the home, and near the deceased’s grave, and it is good to light it with olive oil.