Photonic sensors are of crucial importance in modern science and technology. They can be designed to be ultra-sensitive to certain physical quantities, while robust against other physical parameters. Many photonic sensors are compatible with CMOS technology and can be integrated on chips for use as highly sensitive, small scale and low cost sensors, such as ring resonator, disk resonator, Mach-Zehnder interferometer, photonic crystal, directional coupler, grating, etc. In this thesis we focus on two types of photonic sensors, micro-ring resonator and high contrast grating membrane, including their fabrication, theoretical basis, experimental characterizations, and their applications to the measurement of two fundamental physical quantities: temperature and length. We study chip-based micro-ring resonators, and show that ring resonator temperature sensors can be used to detect temperature differences as small as 80 μK, a 13-fold improved on previously reported results. We study a mirror-in-the-middle system with a high-reflectivity sub-wavelength grating. We show how the mode structure rapidly changes near the points where the left cavity and the right cavity simultaneously come into resonance, and suggest that this is best understood via a perturbation theory starting from unit reflectivity, in contrast to the usual dispersive regime for membrane-in-the-middle work. In addition, the spectral signatures of the system allow more detailed study of the losses than is possible in a simple cavity, and we quantify the reflection, transmission, absorption and scattering losses in the context of a simple model. We use the mirror-in-the-middle system as a platform for high resolution absolute displacement measurement. This technique is based on radio frequency measurement without an optical reference. We have achieved a resolution of 4x10-14 m at a sampling rate of 10 Hz. This displacement sensing is used to analyze the stability and slow movement of the grating membrane in the mirror-in-the-middle cavity system. We also study theoretically two types of buckling transitions due to the optomechanical interaction between light and a grating membrane, which can be observed using our displacement sensing technique