Pirate leggings (beige, red, blue, and brown) can be purchased from the store on Mos Le'Harmless after completing the Cabin fever quest. Pirate leggings in the colors purple, grey, and orange can be only obtained by looting a Pirate impling, Traded from another player, or from the Grand Exchange. They offer no bonuses.
Note: As there are multiple pirate leggings under the same name but in different colors, the price will vary of each color accordingly with the Grand Exchange. Pirate leggings range in value from 179 coins to 13 700 coins.