"What did you do last year?"
昨年 is more formal and sometimes awkward in casual conversations or texts. And even then, 去年 is perfectly acceptable and often used (although not much as 昨年) in the media and formal environments.
Why do they not just use kanji. Urgggg this mix of hiragana and kanji makes everything twice as complicated as it needs to be.
When you are talking about the time itself you use は you only use a particle like に when you are talking about doing something AT a particular time.
I'm not 100% sure, but I've consulted the dictionary and it seems like 先年 means "a few years ago", so I think it would indeed be wrong if used in this case.