The "horn of David" that God promised would spring forth refers to a ruler that He would raise up from David"s descendants (cf. Daniel 7:24; Luke 1:69). The "lamp" is a figure for a leader (cf. 2 Samuel 21:17; 1 Kings 11:36). It refers to the same person God said He would prepare for His anointed, David. In other words, God promised to raise up one of David"s descendants who would defeat his enemies. This promise found partial fulfillment in some of David"s successors who followed him on the throne of Israel, but Messiah will fulfill it ultimately (cf. Isaiah 4:2; Jeremiah 23:5; Jeremiah 33:15; Zechariah 3:18; Zechariah 6:12). [source][source][source]
This royal psalm should encourage God"s people to believe that He will fulfill His promises, specifically the promises regarding David"s messianic descendant and capital. [source][source][source]