Many bacteria exhibit bioluminescence, through which they convert chemical energy into light and when in abundance, can even light up the sea. While it is known that mechanical stress can trigger bioluminescence in eukaryotes such as dinoflagellates, it has often been suggested that this is not true for bacteria. In this work, we show, by joining imaging with rheology experiments, that bacteria indeed emit light in response to shear within seconds of stimulation. The light intensity increases sigmoidally with shear rate and the response to ramping of shear exhibits species-dependent hysteresis. The sigmoidal response is consistent with the response of shear-activated ion channels in eukaryotic cells leading to calcium signaling, and hysteresis is a common feature of ion channels in other systems. We capture the full range of experimental observations using a simple two-state kinetic model with adaptation. The two-state dynamics provides the time scales for the opening and closing of the ion channels and are found to be of the order of seconds. The time scale for adaptation of the total number of channels to shear is larger and introduces the unsteadiness in the system that leads to hysteresis. An additional fourth-time scale is found to be present that results in the decay of light under long steady shear. The role of shear-induced mixing of oxygen in the suspensions will also be discussed.