Optical sensors are widely used for refractive index measurement in chemical, biomedical and food processing industries. Due to specific field distribution of the resonances excited, optical sensors provide high sensitivity to ambient refractive index variations. The sensitivity of optical sensor is highly dependent on material and structure of the sensor. Here, we review six major categories of optical refractive index sensors using plasmonic and photonic structures: (i) metal-based propagating plasmonic eigenwave structures, (ii) metal-based localized plasmonic eigenmode structures, (iii) dielectric-based propagating photonic eigenwave structures, (iv) dielectric-based localized photonic eigenmode structures, (v) advanced hybrid structures, and (vi) 2D material integrated structures. Representative configurations working in the wavelength range of 400−2000 nm will be selected and compared in terms of bulk refractive index sensitivities, figure of merits and working wavelengths. A technology map is established in order to define the standard and development trend for optical refractive index sensors.