The building code requires windows in habitable space. There are requirements for natural light and natural ventilation. There are requirements for emergency egress. There are requirements that the actual window unit installed meets certain energy standards. These requirements must be balanced with the aesthetics from both inside and outside and with the function and use of the spaces.
Excerpt from SECTION R303
LIGHT, VENTILATION AND HEATING
All habitable rooms shall be provided with aggregate glazing area of not less than 8% of the floor area of such rooms. Natural ventilation shall be through windows, doors, louvers, or other approved openings to the outside air. Such openings shall be provided with ready access or shall otherwise be readily controllable by the building occupants. The minimum area to the outdoors shall be 4% of the floor area being ventilated...
There are exceptions (like bathrooms) and special rules for adjoining rooms. It is not a coincidence that the area of light required is double the ventilation area required - think of a "double hung" style window (typical in the Northeast)It offers twice as much light as ventilation. We like light in our homes. Architects like to use a lot of windows. Designs today generally do not have a problem meeting these requirements.
Excerpt from SECTION R301
EMERGENCY ESCAPE AND RESCUE OPENINGS
Basements with habitable space and every sleeping room shall have at least one openable emergency escape and rescue opening... they shall have a sill height of not more than 44" above the floor.... minimum net clear opening of 5.7 square feet... minimum net clear opening height shall be 24"... minimum width shall be 20"... shall be operational from the inside of the room without the use of keys or tools...
The three bedrooms on the second floor of this house each need an egress window. This architectural style typically utilizes double hung windows, but with only one sash - bottom or top- opening, a double hung window has to be excessively large to meet the clear opening area requirements. (this large opening is to accommodate a fire-fighter, in full gear, climbing in to rescue you). Such a large window would look WAY out of proportion, especially on the second floor, so architects have a trick. I specified one casement window, the same size as the double hung windows in the bedroom and with a lite pattern to match. (so it has a horizontal band across the middle, to make it look like two sashes) A better proportioned casement can meet the egress dimension requirements, because the whole window swings open from the side. 
Windows are so important in our buildings for views, light, air, and safety. I hope this post gave you a "glimpse" into some of the things an architect has to consider. We'll talk about the energy efficiency of windows in a future post.