Is there any difference between these words or are they synonyms? Are they used both for "pantalon" and "chemise"?
"toile" is the result of weaving certains raw materials such as cotton and flax in a specific manner. One refers to this manner as "tissue d'armure"; "armure" refers to the way in which threads are made to go over and under other threads; there are 3 such "tissus d'armure": toile, serge et satin.
If a pair of trousers or a shirt, whether it is cotton or flax, is made according to the process used for "toile" you can say "une paire de pantalon en (toile de) coton", "une chemise en (toile de) lin"; you can also ignore the raw material (coton, lin) and say "un pantalon en toile", "une chemise en toile", "une chemise en satin".