What To Look For
Look for shorts to match your needs. Unless you plan on taking part in triathlon sports, going directly from running to cycling or swimming, many of the features for tri shorts will be redundant. However, one factor is key: water-wicking ability. This pulls moisture away from against your body, which causes chafing, to the outside of the shorts, where the water can evaporate. Look for shorts that are based partly in Lycra and partly in other poly materials.
Always try your shorts on before you buy them. Shorts aren't always particularly expensive, but buying more than one pair because you wind up with shorts that don't fit is an expense to avoid.
Where To Buy
Any sporting goods store and even some department stores will sell bicycling shorts, as will most gyms. However, for high-quality shorts and a good selection, go to specialty outdoor stores, like REI, or cycling shops.
You can find a reasonable pair of cycle shorts for between $20 and $30, particularly if you look for sales. If you look for advanced tri-sport shorts, you can spend up to $80 or $100.
A good pair of tri-sport shorts will, of course, make excellent cycling shorts, as that is one of the things they are designed for. If you do serious cycling, particularly for long distances, the comfort and construction of tri shorts will serve you well.
Several things will insure your comfort. Look for more panels rather than fewer. Three is a common average, but shorts come in as many as eight. The more panels, the more closely the shorts will fit your body. Leg length is purely a matter of style and personal preference, but leg grips, the bands of elastic on the inside of the legs, should be wide, secure and tacky to the touch so that the legs of the shorts do not bunch up.