A refractive index of dielectrics was modified by several methods and was known to have direct influence on optical forces in nanophotonic structures. The present contribution shows that isomerization of photoswitching molecules can be used to regulate refractive index of dielectrics in-situ. In particular, spectroscopic study of a polydimethylsiloxane–arylazopyrazole (PDMS–AAP) composite revealed that refractive index of the composite shifts from 2.0 to 1.65 in trans and cis states, respectively, of the embedded AAP. Based on this, a proposition is made for a waveguide structure, in which external UV/Vis source reversibly regulates the conformation of the PDMS–AAP core. Computational study is performed using Maxwell’s equations on buried waveguide structure. The simulation, implemented in PYTHON, sequentially utilizes empirical refractive indices of the composite in the isomeric states in lieu of regulation by a source. The simulation revealed highly confined wave propagations for injected signals of 340 and 450 nm wavelengths. It is observed that the cis state suppresses higher order mode when propagating UV wavelength but allows it for visible light. This modal tuning demonstrated that single mode can be selectively excited with appropriate waveguide dimensions. Further impact of the tuning is seen in the optical force between waveguide pair where the forces shift between attractive and repulsive in relation to the isomeric state of the PDMS–AAP core. These effects which stem from the adjustment of refractive index by photoisomerization suggests that in-situ regulation of index is achievable by successful integration of photoswitching molecules in host materials, and the current PDMS–AAP composites investigated in this study can potentially enhance nanophotonic and opto-mechanical platforms.