From simply a hole in the wall, for two thousand years, the windows have improved dramatically in the last 100 years.  They have improved in insulation by introduction of double and triple and quadruple-pane windows.  E-coating has been introduced to wear off heat transfer, but one of the biggest improvements has been made by Smart windows,  Windows that darken in response to a small elec­tric current or heat, or Adaptive windows”  that uses a printable liquid-crystal coating to vary the amount of incoming heat energy depending on the temperature of the outer pane of glass, while letting in the same amount of visible light.
Such a selectively "thermochromic" window would Automatically admit more than five times more solar heat on a cold winter day than on a hot summer afternoon. 
Just this one technology is expected to reduce a typical house's heating and cooling energy use by up to 30%.

Following are the most important points to know when designing a home or looking for new windows: (for a more detailed list click here)

keep open-able windows to a minimum. Even when closed, open-able windows are more likely to have air leaks. Use only as many open-able windows as you really need for ventilation, comfort and to comply with local code (egress).  Keep in mind that glass conducts an enormous amount of heat to the outside. Windows can lose up to 50 percent of the heat at night.

Depending on the geographical location of the house, the location of the window regarding north, south, east, and west area of the house is critical:
-Glaze for Ventilation.  Some of the solar glazing needs to be open-able for natural ventilation. Open-able windows should be on the north, east, and west sides of the house for cross-ventilation.
- In warmer climates, reduced south-facing glazing cuts down on solar gain while additional north-facing windows release heat. The net result, if properly done, is a cool interior. The greater the need for heat, the greater the solar glazing requirements.
 -Excessive glazing can result in overheating, while at night, too much glazing can lead to much heat loss and uncomfortably cold temperatures. Over-glazing can also lead to overheating in the summer, especially if the house is not properly aligned to the sun. 
As a general rule, solar glazing should fall somewhere between the 7 - 12 % range of the glass-to-mass ratio. In a warmer climate, you may stay between 8 - 10 % glazing. In a colder climate, 12 % glazing might be needed.
See “Glass to mass” for more info.

Create Sun-Free Zones Although newer glazings that limit UV penetration help reduce this problem, ultraviolet light can damage carpets, window coverings, and furniture. Also, be aware of where you plan to watch TV or use the computer regarding glare.

Use shades to keep the summer sun out.  Due to the low sun angle, overhangs are ineffective on east- and west-facing windows. See more on shading here.

To find out if the windows you're considering are appropriate for the climate you live in, look at the Energy-Star or National Fenestration Rating Council FNRC label. The NFRC label indicates the U-value and solar heat gain coefficient (SHGC) for that window. The Energy Star label shows how these ratings compare to the minimum energy-efficiency standards of the U.S. Department of Energy (DOE).

Convection is the transfer of heat between a surface and a moving fluid, such as air or water. The pas­sage of air along a surface encour­ages heat transfer from the warm material to the cooler air. In your house, this is most evident at the windows, where you can feel a draft along the surface.

Radiation is energy transferred by waves and is the means by which the sun delivers its heat. There must be a line of sight between the energy source and the target in order for radiation to be effective. This kind of heat transfer can be manipulated to some extent by increasing reflectivity and diffusion by using tighter colors, or incorporating shad­ing where needed.

Solar Heat Gain Coefficient (SHGC) is an important figure for windows in a solar home. It measures how well a window blocks heat from sunlight. It is the fraction of the heat from the sun that enters through a window, expressed as a number between 0 and 1. The lower a window's SHGC, the less solar heat it transmits.

Blocking Ultraviolet Radiation indicates how well the window protects carpets, drapes, and furniture (although visible light also 'fades fabric). Most windows reduce UV penetration by 75%.

Low-e coating. (low -emissivity) glass has coatings of clear silver or tin oxide on the glass. It allows light to pass through a window but blocks infrared radiation (heat). However, it reduces the transmission of sunlight and, therefore, decreases solar gain.

u- Value: Heat Loss is the opposite of R-value (U-value = 1/R). U-value is the heat transmission through a material.
U-values of smaller than 0.3 are required for passively conditioned homes.

Payback for windows is hard to calculate, but the main advantage is that with the right windows the house would need smaller, cheaper heating and cooling equipment.!

Unobstructed access to the sun for about 6 hours is essential for passive solar heating. Trees on the east and west shade a home during the summer mornings and evenings.