I think you are referring to the “Pitch Limit Indicator”. This is not exactly a light, it’s two yellow bars superimposed on the artificial horizon.
The PLI is capped at 30 degrees pitch, but that does not mean that the plane would stall at 30 degrees: you could climb much steeper than that if you had enough speed.
> However, the PLI also is limited to 30 deg of pitch attitude, regardless of AOA. If AOA or AOA margin to stick shaker were to be used as the first and primary focus of the flight crew during windshear escape or terrain avoidance procedures, extremely high pitch attitudes could be reached before stall warning if the maneuver is entered with sufficient speed. Therefore, the PLI shows the lesser of either margin to stick shaker, or 30 deg of pitch. (http://www.boeing.com/commercial/aeromagazine/aero_12/attack…)
Nevertheless, at least according to some Wired article, one of these steep takeoffs was at a little under 30 degrees. (https://www.wired.com/2014/07/watch-test-pilots-push-the-new…) I guess the pilots use the PLI to gauge the safe pitch.