Like Yellow said, sleepiness could be a factor.
Personally I have a notebook where I write down everything I "want to do" - mostly planning to get to the next level - all the things I have to do to get the pieces in position to make the next big step. The list is perennially unfulfilled.
But in regards to the sunlight thing, it may be because an excess of thoughts may be a subconscious means of escape - we're not where we want to be. Even if we're inside having fun (unlike at work, like I'm imagining), we might instinctively be trying to escape and be free - planning and contemplating, etc.
Once we're outside, however, any possible thoughts might be alleviated. Additionally, or in a different case, sunlight could also trigger more physical impulses, over mental impulses, hence many of your thoughts taking a backseat.
I'm writing this out as I think of it and it's purely theoretical. Interesting question.