There’s no actual instruction on having a window in a basement bathroom. However, if you have a basement bedroom, it requires a legal egress window which can be used as an escape route in case of fire.