Either is possible and correct, although, without more context, "in what year" is better. In these situations, the usual practice is to use "what" when you don't have a certain set/list/menu of choices. "Which", on the other hand, is used when you have a given set/list/menu from which to choose.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
Anonymoushelp me to decideIn what year was the house built?