Transducers for transforming light into mechanical energy or viceversa