This Ph.D. thesis is concerned with the use of sol-gel materials in optofluidic applications and the physics of DNA molecules in nanoconfinement. The bottom-up formation of solid material, which is provided by the sol-gel process, enables control of the chemical composition and porosity of the material. At early stages of gelation, thin gel coatings can be structured by nanoimprint lithography, and purely inorganic silica materials can be obtained by subsequent thermal annealing. The sol-gel process thus constitutes a unique method for nanofabrication of silica materials of special properties. In this work, sol-gel silica is introduced as a new material class for the fabrication of lab-on-a-chip devices for DNA analysis. An imprint process with a rigid, non-permeable stamp was developed, which enabled fabrication of micro- and nanofluidic silica channels in a single process step without use of any high-vacuum techniques. Sealing of the channels was performed by fusion bonding of a glass cover slip to the imprinted surface, and the applicability of the device was demonstrated by sizing experiments on DNA molecules confined in the imprinted nanochannels. In addition, in a fused silica device, the dynamics of linear and circular DNA molecules was studied under pressure driven flow in a slit channel with arrays of transverse nanogrooves. In the nanogroove geometry, transport occurs through two states of propagation: a slow, stepwise groove-to-groove translation called the ’sidewinder’ and a fast, continuous tumbling across the grooves called the ’tumbleweed’. Dynamical transitions between the two states cause DNA molecules to exhibit both size- and topology-dependent velocities that may be utilized for separation. By templating the porosity of sol-gel silica with sub-wavelength latex particles, tuning of the effective refractive index of the material was enabled. Using nanoimprint lithography, a diffraction grating with refractive index of 1.33 was fabricated. This low-index grating was used to demonstrate reconfigurability of an optically functional surface topography by electrophoretic actuation of charged latex nanoparticles. Preliminary results showed 22 dB modulation of the intensity of the first diffraction order. Sol-gel material was also used as a permeable solid matrix for immobilization of analyte-sensitive dye molecules, thus constituting a sensor material for use in reagentbased optical sensing systems. Using the principle of hemiwicking, a method that enables deposition of the liquid sensor material in a homogeneous layer on a well-defined region of a surface was developed. The method simplifies the fabrication of optical sensors integrated in disposable lab ware.