So if the railing sticks out 4", what would the problem with a light be?
The applicable code in the IRC would be:
R311.5.1 Width. Stairways shall not be less than 36 inches (914mm) in clear width at all points above the permitted handrail height and below the required headroom height. Handrails shall not project more than 4.5 inches (114 mm) on either side of the stairway and the minimum clear width of the stairway at and below the handrail height, including treads and landings, shall not be less than 31.5 inches (787 mm) where a handrail is installed on one side and 27 inches (698 mm) where handrails are provided on both sides.
The building code requires a minimum clear stair width. Specific allowances are made for handrails. If a light is below the minimum headroom (6' 8") and protrudes into the required 36" stair width then it is in violation of the building code. Notice that the required width changes at and below the handrail height.
