What is "k'Mishlosh Chodashim"?
Rashi: It is part of the first month, the entire second month and part of the third. A woman's pregnancy is discernable a third of the way along (three months out of the nine), and Tamar gave birth in the seventh month. 1
Why did they add "v'Gam Harah li'Zenunim"?
Rashbam: In order to verify their accusation - that she did indeed engage in Zenus.
Seforno: To impress upon Yehudah that she didn't even take the trouble of hiding from him what she had done, by terminating the pregnancy.
Da'as Zekenim: Perhaps they used to kill only for Zenus and pregnancy, or if she was Mezanah with two men.
Why did Yehudah sentence to burn Tamar?
Rashbam: That was the custom with regard to a Yevamah who committed adultery.
Ramban #1: Yehudah, who was a leading figure in his generation, was having Tamar punished for gross disrespect of her revered father-in-law. 2 Ha'Emek Davar - the custom was that if someone disgraced a ruler, he would judge her according to his honor.
Ramban #2: It was customary at that time to hand over a woman who committed adultery to her husband to do with as he saw fit. 3 And Yehudah took on that role in place of his son Shelah, to whom Tamar was betrothed (a bond which they considered akin to marriage).
Moshav Zekenim #1, citing R. Yehudah ha'Chasid: He wanted to burn only her face, for she was single. Only a married Bas Kohen is executed through burning. Malbim (15) - in lands of Yishmael, the custom is to burn a letter on the face of harlots.
Moshav Zekenim #2: Pesikta says that Yehudah was commanded about Yibum. All agree that a Yevamah who was Mezanah is not killed! 4 Also, Bnei Noach are killed only via the sword! We can say that designation to [fulfill the Mitzvah of] Hashem is no less than designation to an individual. If a Bnei Noach designated a Shifchah for his slave, and her master had Bi'ah with her, he is killed (Sanhedrin 57a). 5
Hadar Zekenim: The custom was to burn anyone who was Mezanah.
Oznayim la'Torah: It was a Hora'as Sha'ah (a one-time ruling), because the people of that generation were lax with regard to Arayos.
Ohr ha'Chayim: Shem's Beis Din had decreed about Zenus with the nations (Avodah Zarah 36a). It seems that this is even if there is no Isur Ervah forbidden to Bnei Noach or Yisrael. Once he realized that her Bi'ah was with him, he exempted her, for there was no decree about Zenus with a Yisrael. A daughter-in-law is permitted to Bnei Noach. The one who says that he kept her for a wife (Sotah 10b) holds that a father was able to do Yibum with his daughter-in-law.
Malbim: The question was whether or not Yehudah had exempted Tamar from Yibum, and she is like a single woman. He answered that he did not, and commanded to burn her. A Shomeres Yavam was considered like a married woman. Yehudah himself could do Yibum, or give her to Shelah, to establish seed for his brother.
See Ramban's objection to this explanation. Moshav Zekenim and Hadar Zekenim, citing R. Yosef: Even though there were no witnesses or warning, the generation wantonly transgressed, so they sentenced her to die, lest people get used to this. Hadar Zekenim - once a man was lashed for having Bi'ah with his wife under a tree. Tamar's first son was called Peretz, for she was judged due to Pritzus of the generation.
Similar to the capital punishment for dishonoring a king.
As was still practiced in many places in Spain in the times of the Ramban (Ramban).
Moshav Zekenim: Maharam says that a Ben Noach is killed for any Aveirah. Once Yehudah realized that Tamar is pregnant from him, he recalled that she had Besulim, i.e. Er and Onan had Bi'ah Lo k'Darkah, so she was single. Hadar Zekenim (26) - she removed her Besulim at (right before) the time of Bi'ah, which enabled her to become pregnant from the first Bi'ah.
The Ran there says that he is killed due to theft. The Me'iri says that it is once it is known that she is special for him.
Why did Yehudah pass sentence? Yitzchak and Yakov were greater than him!
Chizkuni: They all sat on the Beis Din (Shemos Rabah 30:19). In capital cases we do not begin with the greatest Chacham. Moshav Zekenim, Da'as Zekenim, Riva - we read "v'Lo Sa'aneh Al Riv" (Shemos 23:2) like 'Al Rav').
Yerushalmi (Sanhedrin 22b, according to Korban ha'Edah): According to the opinion that Bnei Noach begin with the greatest Chacham, indeed, Yehudah did not speak first. He said that she should be burned, and they agreed, therefore the sentence is attributed to him.
Refer to 38:24:3:3.
What is "li'Znunim"?
Ha'Emek Davar: It is through many acts of Zenus. Usually, a harlot becomes pregnant only after many Bi'os, for she turns over [afterwards so the semen will spill out, to avoid pregnancy].
QUESTIONS ON RASHI
Rashi writes that Tamar was sentenced to be burned because she was the daughter of a Kohen (Shem).. Hashem deposed his seed from Kehunah after the war of the four kings (Nedarim 32b; refer to 14:18:151:1)!
Moshav Zekenim: He must hold that Tamar was born before that (about 175 years ago).
A Bas Kohen is burned because she disgraces her father. Perhaps this applies even after Kehunah was removed from his seed, for he himself remained a Kohen. (PF)