Seriously, though, there is no such thing as a window "working" or "not working". It's a continuum and what might work for one person might be totally unacceptable for another. Checking basic operation is a good place to start. Then probably how well it seals. Is it drafty? Windows should always be locked when they are closed not only for security, but that also pulls everything together and makes a tighter seal. I have heard of guys blowing smoke around a window to look for leaks. I tried it and it didn't really do much for me, but it sounds like it might work in theory. Maybe my windows aren't that drafty. Some companies can even do an energy audit where they use a big fan to suck all the air out of the house and then you can really see where air is leaking in. An infrared camera could be useful as well. And after that, make sure it is properly installed. Make sure it is insulated and make sure water isn't rotting out the wood underneath it. And ultimately, you can look at the actual materials. How many panes? how thick are the panes? What's between the panes? And so on.