* What year did that happen in? (or without IN in the end)
Yes, that sounds fine, but we wouldn't normally use the 'in': it's unnecessary and the combination of 'en+in' is tricky to say.
* In what year did that happen?
Not very natural. The preposition-first option is formal and a little awkward. The question is grammatically correct, but you won't often hear this.
* In what year that happened?
No. It's grammatically incorrect.
* What year was that?
Yes, this sounds fine, providing the context is clear. If someone mentions an incident in the past and another person says 'What year was that?', it's a perfectly correct and natural question.
* (IN) which year was it?
Not natural. The 'in' at the beginning is awkward, and we would only use 'which' if there are a limited number of years specified.
What's the difference between 'Which..?' and 'What..?' ?
As I said above, 'which' is only used when there is a limited and known set of options. 'What' is much more open. For example, 'What's your favourite dessert?' (because there are hundreds of different desserts, and I have no idea what you're going to say) but 'Which dessert do you want? The cake or the ice cream?' (because there are only two possibilities). You can use 'What' in the second sentence, but you cannot use 'Which' in the first.
What's the difference between 'In what' and 'What'?
There is no difference in meaning, but we rarely put a preposition at the beginning of a question in everyday spoken English.
This construction sounds formal, outdated and unnatural. If the preposition is necessary, we put it at the end ("Which man did you speak to?") and if it isn't (as in your example), we omit it.