Optical-quality microelectromechanical deformable mirrors (DMs) and spatial light modulators (SLMs) are described. With such mirrors, the shape of the reflective surface can be modified dynamically to control an optical wavefront. A principal application is to compensate for aberrations and thereby improve image resolution in telescopes or microscopes: a process known as adaptive optics. μDMs are an enabling component for adaptive optics. Over several years, researchers at Boston University and Boston Micromachines Corporation have developed manufacturing processes that allow production of continuous and segmented deformable mirrors. We have produced mirror arrays with up to 22,500 actuators, 3.5μm of useful stroke, tens of picometer position repeatability, >98% reflectivity, and flatness better than 15nm RMS. Challenges to manufacturing optical quality micromachined mirrors in particular have been addressed: reducing surface roughness, increasing reflectivity, and eliminating post-release curvature in the mirror. These silicon based deformable mirrors can modulate spatial and temporal features of an optical wavefront, and have applications in imaging, beam-forming, and optical communication systems. New developments in DM design are discussed, and manufacturing approaches to microamachined DM and SLM production are presented, and designs that will permit scaling to millions of actuators are introduced.