Quick answer: Yes, they filter blue light from any source, including light through a window. But sunlight contains far more blue light than any screen, so outdoors in bright sun you want sunglasses, not blue light glasses. Save blue light glasses for screens and evenings.
Quick context
- Blue light lenses filter blue light regardless of where it comes from.
- Sunlight has vastly more blue light than screens or indoor lighting.
- For bright sun, wear proper sunglasses, blue light glasses aren't dark enough.
- For screens, indoor light, and evenings, blue light glasses are the right tool.
One thing to remember
You actually want bright daylight in the morning to set your body clock, so don't block it with heavy amber lenses early in the day. Use blue light glasses for screens and the evening, and let morning daylight do its job.
The bottom line: Blue light glasses filter blue light anywhere, including through a window, but they're not sunglasses. Wear sunglasses in strong sun, and keep blue light glasses for screens and the evening.