One of the attributes of God is that he is omniscient, which means that he is all knowing. He knows all that has occurred in the past, he knows what is in the heart of man and what is taking place currently, and he knows what will happen in the future.
When God became man, he cloaked his diety: that is to say that as God, Jesus functioned as a man and only accessed his divine powers and abilities as directed by the father.
In this passage when Jesus came face to face with the widow, he, as God, saw her and her condition for the first time. What occurred revealed the nature of God towards man. The scriptures state that when he saw her, he had compassion on her. From this, we can know that as God looks upon us, he will be moved with compassion towards us. Although his plan may require that we endure particular hardships in life, but nonetheless his heart is moved with compassion.
We too should have compassion on others. What is needed for this to occur is to see individuals in their state. This may come from visual sight or Holy Spirit illumination. It is difficult to have compassion on someone if you cannot see them. So in order for us to have compassion, we must see them.