The 2006 International Residential Code spells out a number of code requirements for egress windows and emergency escape room in houses and other residential buildings.
First, you’re required to have at least one egress window or door in a basement and in every bedroom. If you have one in a bedroom in the basement then you don’t have to have an additional one elsewhere in the basement.
The bottom of the window (sill height) can’t be more than 44″ above the floor. The opening must be at least 5.7 sf unless its on the ground floor where it only has to be 5 sf. The minimum opening also needs to be at least 24″ tall and at least 20″ wide. You also have to be able to open the window from inside without any special keys or hardware.
If you have bars or covers over the window or window well it is allowable, but it has to be operable from the inside without a key.
If your egress window is below grade you need a window well with a footprint of at least 9 sf and measuring 36″ minimum in both directions. If it is more than 44″ deep you need a permanent ladder with rungs at least 12″ wide, no more than 18″ of height between rungs and projecting 3″ to 6″ off the wall.
If the window is under a deck or a porch, you have to be able to open the window fully and have at least a 36″ path out from under the deck.
If you happen to be designing a multifamily dwelling there are some exceptions involving sprinklers and corridors along with fire ratings but where you use egress windows the constraints are basically the same.
Of course the question that usually comes up is “why does the opening need to be so big, I’ll get out of a tiny window if there is a fire.” The explanation that I’ve heard is that it has more to do with the size of an opening needed for someone to assist you in escape. The firemen need a bit of maneuvering room to haul you out.
To help you in your design, most manufacturers list which of their windows meet the egress requirements. There can be a bit of variation depending on frame sizes and hardware differences from one manufacturer to another.