Do you need a visa to visit Puerto Rico from Peru?

Yes you do. Puerto Rico is a "Estado Libre Asociado" from the United States of America. A visa will be required in the same fashion you would need one to go to Miami.