Optical sensors and biosensors with response in the visible spectrum region are suitable for integration with excitation sources and detection devices, as laser diodes and photodiodes in the visible region are commercial devices that are easy to purchase from any optical device supplier. In this sense, the present work reports the optical modulation response of microcavity devices based on porous silicon technology, aiming to obtain microcavity response in the visible spectrum region for biosensor application. The optical modulation response of microcavities were obtained controlling the different fabrication parameters such as the doping type of silicon substrate, the number of periods of the Bragg mirror of the photonic crystal, the electrochemical solution, the current density of anodization process, and the anodization time. The results obtained in this work showed that the microcavities response from 1080 nm to 612 nm with quality factor higher than 30. These results showed that microcavities fabricated could be applied successfully to biosensor in the visible region with high optical resolution due their high-quality factor value.