Yes, accordion was popular in the 19th and 20th century. It was made popular by Europeans that emigrated to other parts of the world. It was mostly used in folk music, it was also used in classic music and jazz music. The instrument is still in use in many parts of the world.
The introduction of Modern musical instruments, has lead to the decrease in the use of accordion. Accordion is not as common as it use to be in the 19 and 20th century. The instrument is still popular but it is not commonly use like modern instruments.