You can't say, "What were your favorite food as a child?" The verb must agree with the subject, number, tense and person. So, in order for this sentence to be written in Standard English, food must be pluralized or you must use the singular past tense of the verb 'to be'.
- What was your favorite food as a child? - What were your favorite foods as a child?