The miniaturization of mechanical devices opens new opportunities for investigating and exploiting novel phenomena that occur for components in close proximity. The Casimir force, for example, originates from the zero-point quantum fluctuations of the electromagnetic fields. I will describe experiments that investigate the Casimir effect in micromechanical devices. In particular, we demonstrate the strong boundary dependence of the Casimir force on silicon surfaces with an array of nanoscale trenches. In another effort, subwavelength structures are fabricated on the surface of metal films to strongly modify their interaction with light. The evanescent fields channel the optical energy to specific locations, resulting in strong and localized field enhancement. Coupling of the enhanced evanescent field to the nanomechanical motion of the metallic elements opens new opportunities for tunable optical elements and high sensitivity displacement detection.