Usage of word "sun": 太阳 (tài yáng) vs 日 (rì)
I'd like to offer a slightly different perspective from the other answers, and suggest that the most important difference between the two is that 太陽 is a free word, whereas 日 is a bound morpheme, i.e. it cannot appear as an independent word.  Think of 太陽 as 'sun' and '日' as sol-.  Of course they are not word for word identical with the English forms, but the basic concept is, perhaps, somewhat similar. 

I don't agree that 日 is more common as 'day' than as 'sun'; it is pretty much parallel with 月, which is both 'month' and 'moon', and it's really quite difficult to say which is more common.  The morphology of 'moon' is also somewhat similar to 'sun' in Chinese, except that 月 is free when it means 'month'. whereas when it means the celestial body, it is bound, and you need the form 月亮. (Correct me if I'm wrong!) 

Historically, 日 was both sun and day. (天 was originally different from 日, consisting of two things: 一日and 一夜.) How 太陽 became the word for 'sun' is an interesting question. In a large number of dialects, especially in northern China, the word for sun is still 日頭. It seems that 日 kept its meaning as sun pretty much unchanged in these dialects. 

太陽 seems to have been an astrological term for 'sun', with the moon identified as 太陰. Why did 太陽 win out and supplant 日 and all its variants, while 太陰 lost out completely? I'll award 5 *'s to the lexico-mane who can answer that one.