In the years of Yongle (58A.D to 75), Han Dynasty, Ming Emperor promoted Buddhism highly. A famous monk named Cai Yin came back from India. He told Ming Emperor that monks in India get together and look the Buddhist bones with reverence on 15th of January. Ming Emperor ordered to light lanterns in the court and temples on 15th of January according to the Chinese lunar calendar. He did this to show his sincerity to the Buddhist and this deeds spread to the folk places. From that time on, people light lanterns in the night of 15th of January according to the Chinese lunar calendar to celebrate the Lantern Festival.
Guessing lantern riddles is a popular activity added during the Lantern Festival. It appeared in the Song Dynasty. In the very beginning, some people wrote riddles on the lantern and people guess them. Because the lantern riddles are good for brain exercising and it is very interesting, this activity formally formed in Southern Song Dynasty.