what to look for when buying bicycle pants I want/need some pants for riding my bike to work. It is a 5 mile commute and I want something that is not padded and not baggy. What other things should I look for and what type of pants should I get?
They should be elastic enough so that you can move your legs freely in all directions when you are trying them at the shop.

Padding is very important, but some models can make it very uncomfortable out of the bike. Nowadays, there are some anatomical paddings which, instead of being made of a single patch of padding, are made of lots of geometrically shaped patches of padding of different materials. These work great. If you try a short at the shop and it feels uncomfortable, most probably it will remain uncomfortable.

The stitches and sewings must not have sharp/stingy textures that might annoy you a lot while pedalling.

Good quality usually is associated to larger price, and the opposite.

And, you MUST try as many models you can at the shop. The most comfortable at the cabin most probably would be the best for your ride.

I wouldn't buy one online or preorder, unless I had one identical already in use - and they may change the product without notice!