As bar_an mentioned, when יפה is used to describe a person it refers to physical appearance. When describing a behavior or an action it can sometimes be translated as "nice." For example: יפה מצידך שהזמנת אותי. It was nice of you to invite me. התנהג יפה. Behave yourself/Be nice/Mind your manners.