By what I have read, I understand that trousers - as we know them today - came to be commonly worn as a fashion item after the French Revolution (c. 1800). Apparently the French peasants wore a sort of trouser before the revolution when they were working in the fields - as it was a good garment to wear for such work. The wealthier men up until then had worn elaborate dresses (in the form of tunics), skirts and hosiery (which had developed into upper hose and lower hose - essentially, breeches and stockings).I have never really heard where pants/trousers came from other than the Turks started wearing some sort of trousers for horse-riding.
After the revolution, it was deemed sensible (if you wanted to keep your head on your shoulders) to show support for the working class - and wealthy people did this by adopting 'working class' costume - in particular - trousers. They first became everyday wear in France and this spread to England and then most of Europe etc.
The Victorians chose black as a staple 'colour'. So we have ended up with the common working costume today in many Western countries of a black or dark grey suit. Oh joy.