Judges are allowed to question witnesses at trial, but the scope and tone of that questioning must be limited to his role as a judge, not as an advocate, the Michigan Supreme Court has unanimously ruled in overturning a murder conviction People of Michigan v. Stevens.
Read about it here.