I usually keep the window open at night and have never had anyone say anything. I thought the only rule around that was they had to be shut during take-off/landing if the cabin lights were on.
And the lights are dimmed on a nighttime takeoff/landing so that, in the event of needing to evacuate, your eyes don't need to adjust as much as when going from very bright to very dim.