1. They elected the girl captain of the team.

2. They elected the girl the captain of the team.

(Do we have to use 'the' or not? Which one is correct?)

3. He looked at the girl playing/play the piano. (Is this sentence correct?)

4. I think him to be innocent.
4-1. I think him innocent.

(Are both correct?)

5. Mr. Williams is very smart.
(In this sentence, what is the meaning of 'smart'? Does it mean he is intelligent? Or does it mean he is nice?)

No you do not have to use "the". #1 is correct.

#3. "playing" is correct.

#4. Both are correct.

#5... Smart in that sentence, means that he is intelligent. You can change the meaning of "smart" by saying. Mr Williams looks very smart today. That would mean that he is handsome, well groomed.