The Zohar states that on the final day of Reb Shimon Bar Yochai’s life, he revealed to his students the great and holy secrets of kabbalah. As long as he taught, the sun didn’t set.
The Bnei Yissaschar writes that this explains the custom to light candles and bonfires on Lag b’Omer. It is in commemoration of the sun that continued to shine on the final day of Reb Shimon’s life. ~ R’ Elimelech Biderman