Why are the two witnesses called olive trees and candlesticks?
The two witnesses are called the two olive trees and the two candlesticks because Revelation 11:4 directly applies that title from Zechariah's vision, showing them as the two anointed ones who stand continually before the Lord, supplying oil (a picture of the Spirit) to give light in a dark time.
Revelation 11:3 and 4 tell us that God gives power to the two witnesses to prophesy for one thousand two hundred and threescore days, clothed in sackcloth, and then says plainly, "These are the two olive trees, and the two candlesticks standing before the God of the earth." This title is not invented in Revelation; it is drawn straight from Zechariah's earlier vision, where the prophet sees two olive trees standing beside a golden candlestick, one on the right side and one on the left, feeding oil into the lamp through golden pipes.
When Zechariah asked what these two olive trees meant, the answer he received was, "These are the two anointed ones, that stand by the Lord of the whole earth." So the picture is of two anointed servants who stand continually in God's presence, supplying the oil, a picture of the Spirit's power, that keeps the light burning even in dark days. By calling the two witnesses "olive trees" and "candlesticks," Revelation is showing that they stand in that same anointed, empowered position before God during the tribulation, giving light and testimony to a world under judgment.
Their ministry backs up this picture of anointed power. They have authority to shut heaven so that it does not rain, recalling Elijah, and power to turn water to blood and strike the earth with plagues, recalling Moses. Both of these earlier men of God stood before the Lord in a special anointing, and the two witnesses carry that same kind of Spirit empowered authority as they prophesy for three and a half years clothed in sackcloth, right up until the beast from the bottomless pit overcomes and kills them, after which God raises them and calls them up to heaven.
The scriptures
And I will give power unto my two witnesses, and they shall prophesy a thousand two hundred and threescore days, clothed in sackcloth. These are the two olive trees, and the two candlesticks standing before the God of the earth.
And two olive trees by it, one upon the right side of the bowl, and the other upon the left side thereof.
Then answered I, and said unto him, What are these two olive trees upon the right side of the candlestick and upon the left side thereof? And I answered again, and said unto him, What be these two olive branches which through the two golden pipes empty the golden oil out of themselves? And he answered me and said, Knowest thou not what these be? And I said, No, my lord. Then said he, These are the two anointed ones, that stand by the LORD of the whole earth.
These have power to shut heaven, that it rain not in the days of their prophecy: and have power over waters to turn them to blood, and to smite the earth with all plagues, as often as they will.
And Elijah the Tishbite, who was of the inhabitants of Gilead, said unto Ahab, As the LORD God of Israel liveth, before whom I stand, there shall not be dew nor rain these years, but according to my word.
And Moses and Aaron did so, as the LORD commanded; and he lifted up the rod, and smote the waters that were in the river, in the sight of Pharaoh, and in the sight of his servants; and all the waters that were in the river were turned to blood.
From the books
This answer is drawn from these passages in the Mary Banks Faith Library.