Today in class we were going over the past tense. The textbook had a question: "Who was your best friend in high school?" My student answered, "It was John Smith." Without thinking too much, I corrected him and said, "He was John Smith." Now that I think about it, "He was John Smith" also sounds very strange. Maybe "who?" questions don't go well with short answers or the short answer should have been: "John Smith was." What are your thoughts?
All 3 sound fine to me.

('It' can certainly refer to a person in some circumstances: 'Hi! It's me! How are you?')
Anonymous"I have a child"
What's their name? - Commonly said. This usage is sometimes called "singular their" or "generic their".
What's its name? (not it's, by the way) - Also OK when you don't know the gender.
What's his name? - You can use 'his' here as a generic, and expect to be corrected if it's actually her.

Teachers: We supply a list of EFL job vacancies
I've been reading about this myself. It's similar to the lack of substitute for the "his/her" attribution
"I have a child"
"What is their name?" doesn't sound right, it would be "What are their names?"
"What is it's name?" is a common substitute, but again, I feel like "it" isn't a very formal way of referring to a person.
"What is your child's name" is grammatically correct, but it's not an actual substitute for "his/her". You couldn't say, "Oh you have a sibling? What is your child's name" You could switch it to "your sibling's name", but reconstructing isn't the same as substituting.

I hate my brain sometimes...
 CalifJim's reply was promoted to an answer.
Students: Are you brave enough to let our tutors analyse your pronunciation?
This is an interesting question, because I've never thought about something like this before. Yes, "it" can definitely be used for a person, which seems rather surprising at first - if you had asked me before I saw your post, I probably would have said "no," of course not.

The following are correct:

Teacher: "I want to know who put the frog in my desk. If I don't get an answer, you all stay after school and do homework." Student: "It was Jane."

Dad: "Who put the dent in the new car. If I don't get an answer, no one drives it." Son: "It was me."

Neighbor: "Did you hear? Your neighbor across the street was arrested as the Centerville bank bandit." Other neighbor: "No, it couldn't be him. He's the nicest, most respectable person I've ever known."

Knock at the door. "Who's there?" "It's Jim, open up."