A stall does not have to have a window. However, proper ventilation is needed in a stall. If the barn has proper ventilation, then a window will not be necessary provided there is adequate lighting to see when in the stall.
Fo more information on stalls and ventilation, see the following articles.