"Niedziela" is Nominative. "W niedzielę" is Accusative. Why it's "niedzielę", not "niedzielii" in the Dative resp. Locative, I'm honestly no longer sure-:) ALL weekdays though follow the same pattern:
w niedzielę
w poniedziałek
we wtorek
w środę
w czwartek
w piątek
w sobotę
If you wanted however to indicate "Until Sunday", i.e. "See you (formal or familiar) Sunday!", the form would be "Do niedzielii!", same ending as in the Dative and Locative-:) "Niedziela" is feminine. The other weekdays, respectively:
Do poniedziałKU!
Do wtorKU!
Do środY! (also feminine, like "niedziela")
Do czwartKU!
Do piątKU!
Do sobotY! (fem.)
-:)))