Flexible optoelectronic technologies are becoming increasingly important with the advent of concepts such as smart-built environments and wearable systems, where they have found applications in displays, sensing, healthcare, and energy harvesting. Parallelly, there is also a need to make these innovations environmentally sustainable by design. In the present work, we employ nanocellulose and its excellent film-forming properties as a basis to develop a green flexible photonic device for sensing applications. Cellulose nanofibrils (CNFs) and cellulose nanocrystals (CNCs) were used as matrix materials along with a black thermochromic pigment to prepare thermoresponsive hybrid films. Optical properties of nanocellulose films such as transparency and haze were tuned by varying pigment loading. Nearly 90% transparent CNF and CNC films could be tuned to reduce the transmission to as low as 4 and 17%, respectively. However, the films regained transparency to up to 60% when heated above the thermochromic transition temperature (31 °C). The thermoresponsive behavior of the prepared films was exploited to demonstrate an all-optical modulation device. Continuous infrared light (1300 nm) was modulated by using a 660 nm visible diode laser. The laser intensity was sufficient to cause a localized thermochromic transition in the films. The laser was pulsed at 0.3 Hz and a uniform cyclic modulation depth of 0.3 dB was achieved. The demonstrated application of functional nanocellulose hybrid films as a light switch (modulator) could be harnessed in various thermally stimulated sensing systems such as temperature monitoring, energy-saving, and anti-counterfeiting.