Yeah its a known Imperial fact the Stormtrooper armor crotch glows didnt you guys know that!
Its so if its dark, like in outer space, they can still find the opening to go the bathroom and it also doubles up as a lamp, I think its also Light Sabre resistant.