The transfiguration can be found in Matthew 17:1-8 and Mark 9:2-8. To summarize, Jesus took his three closest disciples with him to a high mountain. He was transfigured before them: this means that his appearance changed. His face and clothes were shining brightly, and Moses and Elijah appeared talking with Jesus. Peter offered to make tents for Jesus, Moses and Elijah, and then God spoke from a bright cloud saying, “This is my beloved Son, with whom I am well pleased; listen to him.” The disciples were terrified, but Jesus calmed them, and they realized only he was with them.
Jesus identifies this event as a vision (Matthew 17:9). Moses and Elijah had actually not been resurrected. However, this vision did have a purpose. The time was near for Jesus to be killed, and there was much Jesus had not yet told his disciples (John 16:12). He gave them this vision, so they would have a memorable image of the glory that was to come. This would strengthen and comfort them when Jesus was being put to death, and during the uncertain period between his death and his resurrection. This would help them see that God had not forsaken Jesus, even though He let his innocent Son die on the cross for the sins of the world. Additionally, they heard God call Jesus His beloved Son. These words would have been encouraging words affirming Jesus’ faithfulness both to Jesus, and to His disciples.
The conversation between Elijah, Moses, and Jesus is not recorded for us. However, we do know that Moses pictured faithful servants of God in the Jewish Age and Elijah represented the faithful sons of God during the Gospel Age or present period. The vision showed all three in glory which prefigured the glory and honor Jesus, His Church, and the Ancient Worthies will have in God’s kingdom. (See the question: “Malachi 4:5-6 seems to be talking about the coming of Elijah – in spirit – in two dispensations. The first is fulfilled by John the Baptist. Who fulfills the second?”)