What does Matthew 17:5 mean?
Witnessing Jesus radiating the glory of heaven while talking to Moses and Elijah, Peter felt the overwhelming need to do something, to say something. This follows the typical pattern of the Gospels, which reveal Peter to be a man of both positive and negative extremes (Matthew 14:28–31; 16:13–19, 21–23). He has suggested the worshipful act of building three tents, resting places, one each for Jesus, Moses, and Elijah. He seems to have in mind the Jewish Feast of Tabernacles (Matthew 17:1–4).Peter's mistake is in implying that Jesus is equal to Moses and Elijah instead of far superior to them as the Son of God. Moses and Elijah were revered in Israel, but they were merely fallible men whom God had used to accomplish great things. Jesus was the perfect and sinless "image of the invisible God" (Colossians 1:15).
This was also not an appropriate time for Peter to speak, at all. Adding to the awkwardness, Peter's clumsy attempt is interrupted—literally as "he was still speaking"—by the voice from heaven. The voice of God the Father booms out that Jesus is His beloved and pleasing Son. God commands Peter, James, and John to listen to Jesus. How awesome and terrible it must have been for Peter to be rebuked by the voice of God the Father. How clearly He must have received the message to listen to Jesus.
The cloud that overshadows the trio fits the description of the cloud that often appeared when God descended to interact with people on earth (Exodus 13:21–22; 34:5–7; 1 Kings 8:10–13). There could have been no doubt in Peter's mind who was speaking to him.