Polyester is one of the most popular materials used to create swim trunks, and for a good reason. It's a highly adaptable material that offers optimal stretch and comfort. Also, it is very soft, which helps to prevent chafing.
Another advantage of polyester is that it dries quickly and helps to wick away moisture. If you're prone to sweating a lot, you'll want to opt for a pair of board shorts made primarily from polyester.