This is simple question but some of the people get it wrong. Though Interviewer is asking for your favorite programming language, but telling a language that is not in job profile may be cause for rejection. Even if you know multiple programming languages, the answer should be about a programming language that is expected in the job requirements.
If you are applying for Java engineer job, it is expected that Java is your favorite programming language. If you are applying for a SQL job, SQL is expected to be your favorite language.
Still while answering this question you can mention about other languages that you know.
Sample answer is:
I have learnt and worked on many programming languages in my industry experience. I know Java, SQL, Shell scripting etc. Each language has its own use. But I am most comfortable with Java. I have done most of my software development in Java. You can say it is my favorite language.Read the full book at www.amazon.com