Q: In Sunday school someone asked, "Why did they light incense in the temple in Bible times?" and not even the teacher knew. Do you know?
A: Most sources will tell you something along these lines:
"The smoke from burnt offerings rose into the heavens, representing our dedication to God. The incense represented people’s prayers rising up to God" (“Then Will I Go unto the Altar of God,” Ensign, February 2014, 66).
This is the symbolism that is used in Psalms 141:2 and Revelation 8:3-4:
"Lord, I cry unto thee: make haste unto me; give ear unto my voice, when I cry unto thee. Let my prayer be set forth before thee as incense; and the lifting up of my hands as the evening sacrifice."
"And another angel came and stood at the altar, having a golden censer; and there was given unto him much incense, that he should offer it with the prayers of all saints upon the golden altar which was before the throne. And the smoke of the incense, which came with the prayers of the saints, ascended up before God out of the angel's hand."
The symbolism whereby the smoke of the incense represents the prayers of the saints is a powerful one, and should help us to understand the importance of prayer in our relationship with God, but there is deeper symbolism which should not be ignored. The burning of the incense to accompany an offering in the temple also had an important symbolic function that relates to the Savior and the cleansing and purifying effect (sanctification) of His atonement.
In Leviticus, the Israelites were commanded to add incense (along with salt and some other things) to their burnt offerings in order that their offerings might be "of a sweet savour unto the Lord" (see Leviticus Ch. 2). This had the symbolic effect of sanctifying the offering and making it acceptable to God.
This symbolism was understood by the people anciently, as it was part of the prayer which was offered by the priests and the people during the portion of the service in which the incense was lit.