Keeping silent, speaking the truth and telling a lie, all these three actions can make bad effects if you don't use your power of discrimination wisely according to the situation.
I shall instance for a confusing idea only:
When we take a person to hospital after a serious injury or a snakebite, we often lie to the victim to reduce his anxiety, pulse rate etc. Here we must tell a lie to save him. In this case truth or silence can't save him. Doctors also do this on many occasions. Mishap (death) happened to a beloved person is not often informed 'directly'. In courts some witnesses tell lies to save the accused. I need not explain why this is wrong.
We shouldn't forget that even while keeping silent, we can convey approval or disapproval with different facial expressions.
Can we remain silent if speaking the truth leads to punishment or
If by speaking the truth we can save a lot of innocent people, we must never be afraid of punishment or treason. We must speak the truth. On some occasions we can avoid this by remaining silent. You can formulate more ideas from the following parts.
If truth makes a relationship unpleasant, then is silence the only
Sometimes knowing the truth at improper time will create problems. But on some occasions one should know the truth as early as possible. So we would be able to act only after understanding the real situation.
We should try to maintain the relationship with good people. (Only if you are quite sure you know the truth) On certain occasions if we are good we (or if I am good I) should relinquish the relationship for the wellbeing of the other person. Later, when the other person realizes the truth, that relationship will/may become purer than before. On some occasions we would feel not to keep on the relationship for the wellbeing of both persons. In such cases also, we will have to relinquish the relationship. Usually, the answer to this question depends on the need and strength of the relationship, the seriousness of the truth and the characters of both persons. So, one specific answer would create problems to both persons. That is, in some cases you would be compelled to keep silent even though it is unsuitable there.
But relationship with bad people should be avoided. So, in such cases you need not remain silent. You can speak the truth directly or indirectly without fearing anything.
If the speaker's (friend's) side is wrong, with a few words one can divert his thoughts to another direction to help him think better and avoid making the relationship unpleasant. So, silence is not the only option here.
How can we decide within ourselves when do we have to speak the truth
or when not to?
I believe that Rishis hadn't said a clear-cut answer to this question. So I think it is very difficult to say an answer to this question very easily. As I said above we should use our power of discrimination properly.
Is it only good to know the truth than to let others know what is the
truth. Because, by any philosophical standards, silence is better than
telling a lie, or is it?
Most people don't want to know the truth or you may say that they are not matured to realize it. Even though many great men had tried to remove the ignorance of the people, they couldn't accomplish it so far completely. This is an evidence to the first part of your doubt .
And for the last part, I have already given some exceptional cases for showing the possibility that is against those philosophical standards.
(As I mentioned earlier) If the snake bitten was poisonous, what would happen to the victim if the helper kept silent or spoke the truth, to a question like this? -- "Is it a poisonous snake?"
The following verses will certainly guide you in many life situations.
satyam bruyat priyam bruyat na bruyat satyam apriyam
priyam ca nanrutam bruyat esha dharmah sanatanah
Meaning: Speak truth in such a way that it should be pleasing to others. Never
speak truth, which is unpleasant to others. Never speak untruth, which
might be pleasant. This is the path of eternal morality, sanatana
In most cases you will get enough time to think well before speaking out an unpleasant truth. And you will be able to do it in another way without speaking the truth. This means silence is a good policy in many cases.
I believe that you know about great social reformers. Many of them didn't speak the truth directly at improper time. Instead, they acted differently.
In the Mahabharatha while Droupati was insulted, King Dhrutharashtra and Bheeshma remained silent. And in the end they lost almost all they had. So when we are among wicked people, we must be very cautious while remaining silent as well as speaking out the truth. Some of our words can thwart somebody's wicked plan completely.
Sometimes we will have to do a little Adharma in order to save/reestablish a great Dharma. So, as a part of this, we will be compelled to tell little lies very rarely. You may have read it in the Mahabharata.
Very great men have transfused many things (including truth) in silence. Ordinary people like us can't do this often.