Using the Born-Oppenheimer approximation, we derive an effective Hamiltonian for an optomechanical system that leads to a nonlinear Kerr effect in the systems vacuum. The oscillating mirror at one edge of the optomechanical system induces a squeezing effect in the intensity spectrum of the cavity field. A near-resonant laser field is applied at the other edge to drive the cavity field, in order to enhance the Kerr effect. We also propose a quantum-nondemolition-measurement setup to monitor a system with two cavities separated by a common oscillating mirror, based on our effective Hamiltonian approach.