In American law there are almost no positive obligations that one must fulfill. You can be summoned as a witness and punished if you do not testify, but in Jewish law the obligation goes further.
According to Halacha you must testify in a matter that you know about even if you haven’t been called as a witness, as is outlined in Leviticus chapter 5 verse 1, “Venefesh Ki Techeta Veshamah Kol Alah Vehu Ed Oh Ra’ah Oh Yada Im Lo Yageed Venasa Avono. A person incurs guilt when he heard a public oath, and although he is able to testify as one who has either seen or learned of the matter, but he does not give information, then he is subject to punishment.”
The Rabbis noticed a strange spelling in the word Lo, not. Normally it is written just Lamed-Alef, but here it is written Lamed-Vav-Alef. Rabbi David Moscowitz comments that the Torah is hinting at the homophones, Lo and Lo, Lamed-Alef and Lamed-Vav, meaning not and to him.
Normally you are supposed to speak to him or to the court, directly, when you know something. But sometimes you are not supposed to speak. As the Rabbis taught, As much as it is mitzvah to say something that will be heard, even a rebuke, so too is it a mitzvah not to say something that will not be heard. A story is told of one of the prior Slonimer Rebbes who was collecting money for poor families before Pesach when he entered the home of a known miser and simply sat down in silence. When questioned by the miser he replied, “Normally I berate someone who doesn’t give tzedakah, but I know that that will have no effect on you. And it is a mitzvah not to say something that will not be heard. So, I’m fulfilling that mitzvah and I’m not asking you for money for poor families.” The miser was so embarrassed that the Rabbi wouldn’t even ask him for tzedakah that he gave a generous donation.
Most often we need to say what has to be said, but occasionally, if our words will fall on deaf ears, it is better to hold our piece.