"Peso" derives from Spanish for "weight," originally referring to a specific weight of silver or gold. The Spanish peso (16th century) spread throughout the Spanish Empire.
Over time, it became the currency of former Spanish colonies: Mexico, Argentina, Chile, Colombia, etc. Some still use peso; others adopted dollar/euro.
The term also applies to unrelated currencies like the Philippine peso, named due to Spanish historical influence in the Philippines.