In this paper, tunable narrow bandwidth band-stop and band-pass optical filters for visible light communication (VLC) are designed and numerically investigated using a photonic crystal (PC) structure. Designing a tunable filter for visible light communication is crucial for enhancing spectral utilization and maximizing communication efficiency. A rectangular defect with optimized sides length utilized in the center of the PC structure based on the desired filtering characteristics. To obtain a favorable narrow bandwidth filter for visible light wavelengths, this defect is filled with a specific liquid crystal. In addition, an electric field is applied to the proposed structure in order to change the refractive index of the liquid crystal and achieve tunability in the desired range. The functional wavelength ranges of band-pass and band-stop filters are 550–570 nm and 565–585 nm, respectively. Applying an electric field causes a shift in the central wavelengths of the filters. It is shown that a 1.5 nm central wavelength shift for a band-stop filter and a 0.9 nm central wavelength shift for a band-pass filter can be achieved by changing the voltage source up to 1.5 V. In addition, the impact that the variation in the length of the rectangular defects’ sides has on the filtering characteristics of the proposed device is studied.