An egress window is required in specific locations in a dwelling to provide an emergency exit. Windows must meet specific size requirements to qualify as an egress window.
Egress windows are required in every room used for sleeping purposes (bedrooms) on any floor and in basements with habitable space.
If you are constructing a new home, the code requires that you put an egress window in each bedroom. It also requires an egress window in the basement if habitable rooms will be finished in the basement. If you install a basement bedroom, an egress window is required in each bedroom but you need not provide another egress window if there are other habitable rooms in the basement. The bedroom window(s) suffices for the habitable rooms.
If you have an existing home and you add a sleeping room in an unfinished basement, the code requires that you install an egress window in the sleeping room or rooms. Likewise, if you create habitable space in your basement other than a bedroom and you currently do not have an egress window, the code requires that you install one as part of the installation of the habitable room.
An egress window must satisfy four International Residential Code (IRC) criteria:
The window opening must be operational from the inside without keys or tools. Bars, grilles and grates may be installed over windows but must be operational without tools or keys and still allow the minimum clear opening.
If you're replacing a smaller window with a larger one that meets egress requirements, bear in mind that enlarging the height of the opening takes less structural work than enlarging the width. Increasing width might mean installing a larger, beefier horizontal structural header over the window opening - a major project. Increasing height is often only a matter of lowering the height of the sill below the window.
A wide variety of window designs can be used for egress windows. You should select a window design that meets your architectural, aesthetic, space, and financial limitations. (Dimensions shown are for illustrative purposes only.)
Window wells must:
Window wells may be made of rust-resistant metal, treated wood, wood naturally resistant to decay, concrete, masonry, or plastic. Some window well designs have steps built or molded into them. Covers are permitted.

When bedrooms are added to basements without the requisite egress window, they create a dangerous underground firetrap. During remodeling, homeowners often unwittingly replace large egress windows with smaller, non-egress windows. And while the code will require egress windows be installed when bedrooms are added on, they won't necessarily dictate that windows in existing bedrooms be enlarged to egress size; it's simply too difficult to monitor every situation.
Required or not, egress windows are crucial lifesaving equipment. If a room has even the remote possibility of later becoming a bedroom, include an egress size window.