The Medrash states that when Iyov saw the death of Aharon’s two sons, he said (Iyov 37:1): “For this too does my heart tremble.” The Chida zt”l (Sefer Nachal Kedumim) explains by citing the Gemara (Sotah 11A) that says that Pharaoh had three advisors – Bilaam, Iyov, and Yisro. When Pharaoh suggested the plan of enslaving the Jews, Bilaam promoted the idea and, as a result, was killed. Iyov was silent, and, as a result, he was punished with suffering. Yisro fled and was rewarded.
Iyov thought that he had done nothing wrong by remaining silent and he would not be punished for this. However, when he saw the death of Aharon’s two sons, he realized that he had been mistaken. This is as the Gemara says (Sanhedrin 52A) that the reason the two sons of Aharon were punished was because Moshe and Aharon were walking on the road, with Nadav and Avihu walking behind them and the rest of the nation behind Nadav and Avihu. As they walked, Nadav said to Avihu, “When will these two old men die already so that you and I can lead the nation?”
We see that Nadav spoke while Avihu remained silent but both of them were punished. This is proof that one can be punished for silence. When Iyov saw this, he realized that he also was liable for his silence and he said that he too had to tremble for what he did.
This is an important lesson. A person can be punished for remaining silent when he should speak out. There is a time to be silent and a time to speak up and protest against a wrongdoing.