I can speak from my current situation that people are, without question, more productive when a window view is available.
To make a long story short, the company has downsized quite a bit. When I started, the company took up most of the 3rd floor of the building, an office lined with big windows and lots of natural light. Regardless of where you were in the office (except for the kitchen), you had a window in view.
People were motivated, cheerful and productive - profits and revenue were quite high.
As the number of employees shrunk, so did our office space, until they decided to move into a basement office. There are no windows or natural light sources at all. The handful of employees left with the company have no motivation, are generally pissed off that they have to be there and do as little as possible in order to keep their jobs.
Many times the running joke in the office is for someone to ask "Hey Rick, how's the weather?" - since there are no windows, we have no idea if it is raining, snowing, or a beautiful day outside.
So to answer your question, if you have a a choice - put your desk somewhere where you can see the window, even if not directly in front of you.
Remember, if you find yourself daydreaming or feel distracted, you can always close the blinds.