New investigations are carried out on the optical spectral response of grating based nanophotonic structures and their sensitivity to refractive index variations of a liquid like analyte embedded within and on top of nanometer-sized grating structure. The phenomena examined are guided wave resonances in dielectric grating/waveguide structures, respectively, and scatterometric effects in non-resonant structures. Both resonant and non-resonant configurations are shown to allow refractive index detection limit on the level of 10-6 - 10-5. The spectroscopic scatterometry approach offers also specificity in particular when the analyzed materials are dispersive and absorptive. The planarity and operation at normal incidence as well as possibility of fabrication using silicon technologies are advantages for these structures that permit building arrays of sensors for biochip applications.