This idiom is used in the context where one should avoid talking.
The reference to this idiom can also be made as one needs to stop talking as whatever he/she speaks turns the either way and causes difficulties.So he/she is asked to stop talking thereby not inviting further difficulties.
1)Krishna wanted to talk on the convocation day, but was made to bite his tongue due to his butler English.
2)"Go away or bite your tongue", Rahul shouted at Manoj as Manoj was diturbing the entire scene of play.
3)Peter was made to bite his tongue on that particular day as whatever he spoke turned negatively.
4)My mother asked me to bite my tongue because she wanted some peace of mind in the house.