I'm sure he loves the sunlight - but you have to be really careful of direct sun heating up the tank... sometimes on really warm and sunny days - it can heat the water to almost boiling! And in colder climates/temps - the draft can make the water quite cold... Drastic temp changes stress bettas too. I've always heard to keep them away from windows for those reasons.
Actually you would think bettas like sun but its the opposite they do not like direct sunlight and actually prefer darker areas. The sunlight will stress them out and that will lead to other possible things like illness etc. Bettas natural habitat is actually in muckey dark waters in rice patties.
also, sunlight makes algea grow
It's best not to put a bettas in direct sunlight because of the temp. flunctuation that can be stressful, and the algea growth.
Though its really good to expose them to direct sunlight for a couple hours a day if possible, it will help them get natural vitamin C, that they wouldn't be exposed to otherwise, which helps keep them healthier, more active and more colorful.