Jesus also asked who they thought he was. Peter answered that he believed Jesus to be the Messiah. It is these sayings to which the Gospel writer is referring. Jesus doesn't always go to a mountain to pray. Most often, we hear about Jesus going to a lonely place to pray, but here, he goes to a mountain.
Mountains are often holy places.
Remember, that it is on a mountain where Noah lands after the flood and builds an altar to worship God. It is on a mountain where Moses receives the 10 commandments. It is on a mountain where Abraham is told to sacrifice Isaac. Mountains are often understood to be holy places places of encounters with God. Moses and Elijah appear there with Jesus, and the three of them hold a conversation.