Why did Yehudah instruct Tamar to wait?
Rashi: He was simply putting her off, as he had no intention of giving her to Shelah, seeing as she was a Katlanis (whose first two 1 husbands died). 2
Ramban: Although Shelah was ready to perform Yibum, Yehudah wanted him to wait, because, due to his youth (he was ten), he was afraid that he would sin like his brothers. And Tamar, who saw that Yehudah was not doing anything about it, took the initiative, in her eagerness to have children from that holy family. 3
Rosh, Moshav Zekenim: Surely he did not lie to her! Yehudah intended that Shelah would mature, marry someone else, father children, and then marry Tamar. Shelah would not marry her first, lest he die like his brothers, i.e. without children. 4 Only that Yehudah hid his intentions from Tamar, who expected to marry Shelah once he matures.
Oznayim la'Torah: Yehudah suspected that Er and Onan died because Tashmish was hard for them, and he was therefore waiting for Shelah to become a little stronger before giving him to Tamar.
Malbim: He told her to wait as a widow, i.e. in her father's house awaiting Yibum. A Bas Noach can annul her marriage herself, or her situation of awaiting Yibum, by saying 'I do not want.' He told her not to do so. Shelah was concerned to do Yibum now, lest he die like his brothers, for Tamar is Katlanis. When he is old enough to do the Mitzvah and establish seed for his brother, 'Shomer Mitzvah Lo Yeda Davar Ra' will apply.
Ha'amek Davar: The custom was that a Shomeres Yavam waits in the house of her deceased husband. Yehudah did not know why Er and Onan died. He suspected that his children were prone to die at eight years old. If also Shelah will die at eight, why should Tamar spend four 5 years in Yehudah's house for naught?! 6 Therefore, he told her to wait in her father's house; if Shelah will die, she will marry someone else.
And he held that a Chazakah takes effect already after two times. Refer to 38:11:1.3:1 .
In which case she was not permitted to marry again. Oznayim la'Torah - The Ramban and Rambam (in Teshuvas Pe'er ha'Dor, Siman 170) hold that we do not push away a Torah Mitzvah due to a mere suspicion (Katlanis). Some apply 'Shomer Mitzvah Lo Yeda Davar Ra.' Yehudah's words, "Ki Al Ken Lo Nesatiha l'Shelah Beni" (38:26) also imply that she was permitted. See Ramban.
He holds that Katlanis applies only if her husbands died without children. Sefer Chasidim (478) says so (but adds, or if they died right after Bi'ah with her). Beis Yitzchak (EH 1:45) discusses this opinion. However, the Rosh and Moshav Zekenim say that Katlanis is due to Mayan (a venereal disease)! Perhaps he was stringent to be concerned for Katlanis after two deaths only for the catastrophic possibility of dying without children (in particular if Yehudah knew that Mashi'ach must come from himself, and he did not expect to have more children - refer to 38:6:151:1) but not for dying with children. Or, perhaps 'Mayan' is a printing mistake; it should say 'Mazal' (PF).
What is his source to say so, i.e. Shelah was only four at the time? Perhaps it is a mere example of how long was "va'Yirbu ha'Yamim" (38:12). (PF)
Harchev Davar: Bereishis Rabah (85:5) says that even though there is not [concern for] Nichush, there is [concern for] Siman. This does not refer to Katlanis, which is a law for which we are concerned! Rather, it is a bad Siman for Tamar to be in his house, for her two husbands died. When the Mitzvah of Yibum applies, 'Shomer Mitzvah Lo Yeda Davar Ra' will nullify all concern.
Rashi (to 38:24) writes that Tamar was Shem's daughter. Seeing as Shem had already died, how could Yehudah say "Shvi Almanah Beis Avich"?
Tosfos to Kidushin 5a DH 'Al Menas': This teaches us that all the offspring of one's father are called 'Beis-Av,' even after their father has died.
QUESTIONS ON RASHI
Rashi writes: "'For he said, [Lest he also die, etc.]' - I.e., he was deflecting her with a poor excuse (lit. with straw)." How do we know it was merely an excuse?
Gur Aryeh: Although Yehudah made it sound like he wished that Tamar would eventually be married to Shelah; the reason the verse gives ("lest he die") shows that he did not want that he marry her at all. What he said was just a pretext.
Rashi writes: "He was deflecting her with a poor excuse." Why didn't Yehudah tell Tamar the truth, that he did not wish that she be married to Shelah?
Gur Aryeh #1: Had he told her that, she would likely have married someone else. It would be respect to the deceased that she not marry an outsider in their stead.
Gur Aryeh #2: Due to the mitzvah of Yibum, he did not want that she would be married to someone else. 1
We must then ask, why didn't Yehudah tell Shelah to perform Chalitzah? Perhaps Gur Aryeh understands that although Chalitzah would permit her to re-marry whoever she sees fit, it nevertheless does not fulfill Yibum, and Yehudah thought it preferable that she remain an Almanah. (EK)
Rashi writes: "'Lest he also die' - This [woman] has a Chazakah that her husbands die!" But we usually hold that a Chazakah is established by three events, not two?
Gur Aryeh: Although regarding a Shor Mu'ad, the Halacha is like Raban Shimon ben Gamliel who requires three times, regarding such a marriage the Halacha follows Rebbi who requires only two (Yevamos 64b).