Answer:
He was frightened and lonely.
Step-by-step explanation:
When he went to the window he probably wanted to see the rain and find out what it was, but when he heard the thunder he was frightened. He was also was scared that he was alone while it was storming.
I hope this helps! Have a good day!