I've always kept my carboys in rooms with incandescent lights that go on frequently, or having windows that provide intermittent, natural ambient light, and have never had any issue arise because of it. No off flavors, no stuck fermentation, no skunkiness, etc. I've never allowed a carboy to sit in a room with large amounts ambient light, or in direct sunlight, uncovered.
The caveat is that I will occasionally use black plastic garbage bags and a blanket to assist in temperature control, but not all of the time - frequently my carboys are sitting in a room against a wall with nothing wrapped around them. I use a blanket primarily as a way of moderating fermenting temperature, but also incidentally serves to block light. It keeps in some of the warmth in my ales when fermenting in a cold room. The black plastic garbage bags also serve to moderate fermenting temperatures to a lesser extent, and to dim the lighting. Where a blanket may actually provide too much heat retention, a black plastic garbage bag won't retain nearly as much heat. The light blocking from a single layer black plastic garbage bag is so-so (perfect for electric lighting IMO), so I will use two black plastic garbage bags if I'm concerned about there being too much light (i.e. large amounts of ambient light).
Side note: Setting a carboy in a black plastic bag with an upside-down juice pitcher over the airlock and pulling the garbage bag strings tight also provides a catch-basin for blow-off fermentation in case it happens.
That's how I do it and it works for me