The Bible tells us that when Nathanael first met Christ Jesus, before Nathanael even had an opportunity to speak, the Master said of him, "Behold an Israelite indeed, in whom is no guile!"
Now, Nathanael's friend Philip had told him that Jesus was the promised Messiah. Still, Jesus' instant insight into his character evidently surprised Nathanael—as it probably would have most of us. "Whence knowest thou me?" he asked. One can imagine that Jesus' reply went straight to Nathanael's heart. "Before that Philip called thee, when thou wast under the fig tree, I saw thee," John 1:47, 48. Jesus told him.
Dummelow's Bible commentary suggests that Jesus may have been referring to some recent prayer or resolution that Nathanael made under the fig tree. The Bible text indicates that Nathanael was deeply moved by Jesus' words. They were evidently what he needed to hear in order to be convinced that Jesus was indeed the Son of God, and he immediately became a loyal disciple.