When we look out of a window, our eyes instantly adjust from the darkness of the room to the bright view outside. So if we want to simulate the scene as we subjectively perceive it, it's perfectly natural to paint both the interior and exterior areas in a full range of values.
Here's a detail of the painting "Artist's Bedroom in Ritterstrasse" by Adolf Menzel. The rendering of the buildings looks as it might if the artist were painting the scene outside as a separate landscape.
But in reality, the interior of a room that's not artificially illuminated is vastly darker than the scene outdoors. It's often true that the darkest dark in the scene outside is lighter than the lightest light inside.
Photographers know that if you expose for the room, the brightness of the scene outside the window exceeds the capacity of the film or sensor, so it burns out to white, or is "clipped." So with a single exposure, the best you can hope for is a compromise exposure, which makes the room look a little too dark and the window view a little too light.
Modern high-dynamic-range (HDR) photography allows you to combine different exposures to make a single photograph, which comes closer to our natural perception.
But for painters, the problem is usually the reverse. We tend to unconsciously even out the exposures and paint everything in middle values. I find it helps to keep in mind the true relationships. That means painting the room darker than it appears to the eye, and the scene outside brighter than it appears.
Hotel room photo by Steve
HDR Photo by Jim Kimmons