For hundreds of years now, the custom has been to light a large bonfire near R. Shimon bar Yochai’s gravesite on Mt. Meiron, in honor of his hillula. Chassidim have a custom to light bonfires in other places as well. Some light candles in their synagogues in commemoration of the hillula.
Candles and light allude to Torah and mitzvot, as it says, For the commandment is a candle and the Torah is light (Mishlei 6:23). Fire is a wondrous thing. Out of inanimate, cold logs and oil suddenly comes forth a flame that has tremendous powers – to give light and warmth, and to burn. This is why Torah and mitzvot are compared to fire and a flame. By way of the Torah [that is studied] and the mitzvot that are observed in this dark, cold world, a person merits everlasting light.
Chassidim light bonfires on Lag B’Omer to allude to the great light of the hidden Torah that Rashbi revealed on the day he died. The Zohar (vol. 3, p. 291b) relates that R. Shimon bar Yochai revealed great secrets that day, which were recorded in Idra Zutta, and his students could not get near to him because of the great fire [that surrounded him].
Nevertheless, we must emphasize that the customs of [rejoicing on] Lag B’Omer are voluntary. Neither the Rambam nor the Shulchan Aruch rule that one must light a bonfire on Lag B’Omer or visit the grave of R. Shimon bar Yochai. Furthermore, many great rabbis disregard these customs altogether.