The Rebbe says:
1. In this week’s Torah portion the Torah tells us that Yoseph Hatzadik (Joseph the righteous one) was a man who was “Yefas To’ar V’Yefas Mar’eh – handsome of form and handsome of appearance” and he would curl his hair. The Torah continues and tells us that this caused the wife of his master Potiphar to cast her eyes upon him and want to lie with him, and this eventually landed him in jail. However, even while he was in jail Hashem was with him and he was successful in whatever he did.
In short, there are two parts to this story; 1) Yoseph Hatzadik was “Yefas To’ar V’Yefas Mar’eh – handsome of form and handsome of appearance”, and 2) the issue of Potiphar’s wife.
Obviously, since the Torah is an everlasting guide for our lives, and every singe story has a lesson for us to learn from, there are lessons to be learned from each part of this story.