Oh, I oh I don't know. My romantic side was getting carried away I suppose.
Direct sunlight would be harmful for people too, so they would filter out that anyway. The environment under these windows would always be regulated, and the stars would just be a view that wouldn't contribute much radiation and any heat to the ship's environment under any circumstances (only enough visible radiation to see things would be allowed through, and no other wavelengths).
Of course, the arboretum wouldn't need the window for the sake of the trees; why would you assume that I would think it would? The window would only be for the benefit of the people in the first place. In addition, the arboretum on the TMP Enterprise did have side facing windows to space. I was extrapolating from that I suppose.
But the artificial sunlight in an arboretum would waste the view to space at least half the time. Like I said, I suppose I was just getting carried away with the idea of a walk in nature under real stars.
And there we have the only practical purpose for such windows, I think. Human psychology. Big "skylight" windows would serve as a means to combat claustrophobia. (On the other hand, it would be really rough on agoraphobics, wouldn't it?)
Now, the argument for these being windows to science bays is not unreasonable, but there is one major counter-argument against that. Why would you design your science hardware so it all faced in only one direction? This seems to be to be a fatal flaw in the idea of these being skylights for sensor hardware.
But for human psychology, "the sky overhead" is a big deal. At the very worst, with the lights dimmed, you'd be able to see the stars. And this would give the crew the opportunity to see interesting sights (nebulae, planets, etc) as well.
These windows would serve very little "functional" purpose, except from a psychological standpoint, I think... which is why I feel so certain that this is what they must be.