Molecular switches and motors are essential components of artificial molecular machines. In this perspective, we discuss progress in our design, synthesis, and functioning of photochemical and electrochemical switches and chemical and light-driven molecular motors. Special emphasis is given to the control of a range of functions and properties, including luminescence, self-assembly, motion, color, conductance, transport, and chirality. We will also discuss our efforts to control mechanical movement at the molecular level, a feature that is at the heart of molecular motors and machines. The anchoring of molecular motors on surfaces and molecular motors at work are discussed.