I would have to slightly disagree with the information someone found in Wikipedia (no, Wiki is not the bible!!) Spanish conquerors dictated the fashion when they conquered peruvians for 500 years. The hat they wore was slightly different than the bowlers hat but there is enough evidence to prove that the hats (and other fashion accessories) were derived from the spanish fashion. These hats are mainly used in the province of Puno (border with Bolivia), they are mainly white and sometimes they adorn it with coloured threads. There is a famous dance called La Diablada (dance of the devil) where they (the women) wear the hats.
Bowler hats as in England are not the ones used by the ingidenous people as the English setters never went to Puno, where these hats are worn. Irish railway contructors went to another part of Peru, not Puno. Dont know about Bolivia though. The info in Wiki sounds more like a legend to me.
Taught this in school while I was a kid (in Peru) teach it now to my kids, I am a teacher.