Yes. Puerto Rico is a U.S. territory, and travel between the mainland and Puerto Rico is considered domestic travel. U.S. citizens—including those with pending criminal charges—do not need a passport and are not subject to immigration screening. There is no legal barrier preventing such travel.
However, individuals should be aware of any court-imposed travel restrictions (e.g., bail conditions) that may limit movement.