Tell me please which question is correct:
What year did the song come out?
In what year did the song come out?
English Language Learners Stack Exchange is a question and answer site for speakers of other languages learning English. It only takes a minute to sign up.Sign up to join this community
Both are perfectly idiomatic. Generally speaking the inclusion or exclusion of in in such questions will depend mainly on the context.
The preposition really means in the course of what year. So people are more likely to ask:
What year do you plan to retire?
What year might you join us at Christmas?
when the actual year rather than any month of the year is indicated.
On the other hand, the likely inclusion of in might occur in sentences such as:
In what year did the first symptoms of the disease appear?
In what year did you begin to lose your hair?
Here the question means: During the course of which year.
However, the choice is as much a matter of preference as of context. In your examples you could as easily include the preposition as omit it.