Yes, if your manager or supervisor instructs you to participate in an investigation then you need to follow their directive.
Witnesses can be crucial to providing the ‘full picture’ in an investigation. In complaints of harassment or misconduct, it can often be one person’s word against another, often with no witnesses to corroborate either side of the story. When witnesses are available, they can help offer a new perspective to what actually happened, and are informative when the investigator is drawing up their report.
Just like anyone else interviewed, it is important to be honest and truthful in answering questions during an investigation. The investigator will be assessing your character as well, and will be probing to see if you have any particular allegiance to one side or the other that would be clouding your story. Don’t worry about embellishing anything; just answer the questions with anything that you have witnessed.
Also remember that there is a legal prohibition on reprisal, which is punishing someone for exercising their rights. If either the employer or another employee takes actions against a witness simply for coming forward, they could be faced with legal consequences for their actions.