A sourdough starter can be in direct sunlight without a problem, but not always! Leaving your starter in the window will warm it up when the sun shines on it. This can cause temperature volatility which will weaken a starter.