Witness impeachment is the process of challenging the credibility of a witness in trial. There are many ways by which a witness can be impeached.
For instance, during cross-examination, any party may attack the credibility of a witness by the following:
1) Introducing statements of the witness, which are inconsistent with his/her present testimony
2) Showing that the witness is biased.
For example: A hearsay statement that a witness disliked the defendant may be admitted to show witness’s bias.
3) Showing a defect of capacity, ability, or opportunity in the witness to remember or recount the matters about which he/she testified
4) Proof by other witnesses that material facts are not as testified to by the witness being impeached
5) Prior criminal record
A party can attack a witness’s credibility, by providing evidence that the witness has been convicted of a crime that was punishable by death or imprisonment in excess of one year under the law under which he/she was convicted, or if the crime involved dishonestly or a false statement regardless of the punishment.
6) Drug and Alcohol use by a witness on the day of the crime. This is usually admissible because it affects the witness’s ability to perceive events correctly.
Generally, it’s not up to the judge to allow or disallow a witness to be impeached. All witnesses take an oath before they testify. Lying under oath is a criminal offense aka perjury for which one can be prosecuted. If a witness is impeached it’s up to the judge or jury to make a decision of what to believe or what not to believe from the testimony that the witness made.