I know the definition of both of these words are Sunday but in what context are they used?
As a native speaker in mainland China, I don't agree with that 星期日 is hardly used.
1 周 星期 礼拜
周 and 星期 are both more commonly used than 礼拜. It's hard to tell which one is more formal. It's only a matter of personal habits varying from ages and regions.
2 日 天 for Sunday
周天 and 周日 both mean Sunday. 周天 is informal.