1.When a personal pronoun or a noun is used as an attributive genitive. It generally takes the structural particle "的“, e.g. "他的书”, “张老师的学生”,“小明的哥哥”, etc.
2.When a personal pronoun is used as an attributive and the headword is a kin term or an institutional one." 的" my be omitted in the attributive, e.g. "我哥哥", "他姐姐“,"我们学校, etc.
Anyway, grammar is only a guideline, if you are not sure about when you use it, it would be better to check with a native speaker.