different mushrooms have different requirements regarding amount of light (if any), moisture or what kind of temperature they need.
So if you have instructions with your kit..follow them.
Keeping out of sunlight is different to keeping on window sill..they might require filtered light but don't like straight sun light. Just like in forrest..light levels differ a lot and certain varieties can be only found in edge of the wood where light is strongest and other deep within woods where sun don't touch the ground but its not dark neither etc..
Widowsill kits are good on those widows where sun don't get..like north side..or inner room if such a sill is not available.