Purple was a color worn by royalty. The soldiers did not believe that Jesus was king. They clothed him this way to mock him because others said that he was the King of the Jews.
"a crown made of thorny branches"