Commentators explain that Peter's nonsensical suggestion was a direct result of overwhelming fear and awe. The sight of Jesus's transfigured glory was too much for the disciples' human nature to process, causing them to be bewildered and not know what to say. This illustrates that in our current state, we are not fully prepared to experience the full weight of God's glory.