20 Jesus then saw this man in whom was no guile, and said, “Behold an Israelite indeed, in whom is no guile.” Nathanael says unto Him, “Whence know Thou me?” Jesus answered and said, “Before that Philip called you, when you were under the fig (that is, under the fig-tree), I saw you.” Nathanael answered and said unto Him, “Rabbi, You are the Son of God; You are the King of Israel.” Some great thing Nathanael may have understood in the saying, “When you were under the fig-tree, I saw you, before that Philip called you;” for his words, “You are the Son of God, You are the King of Israel,” were not dissimilar to those of Peter so long afterwards, when the Lord said unto him, “Blessed are you, Simon Barjona, for flesh and blood has not revealed it unto you, but my Father which is in heaven.” And there He named the rock, and praised the strength of the Church's support in this faith. Here already Nathanael says, “You are the Son of God; You are the King of Israel.” Wherefore? Because it was said to him, “Before that Philip called you, when you were under the fig-tree, I saw you.”
Source: Tractates on the Gospel of John (New Advent)