There are all kinds of products to use for shelving. Some are stronger, some are cheaper. Depending on what type of shelf you have in mind, how big you need it to be and what you plan on using it for determines what properties your shelf needs to retain. Other factors to consider are aesthetics, such as bookcase shelving versus garage shelving.
Plywood is the most widely used shelving material for two reasons. It's light and strong, but all plywood is not created equal. When plywood is purchased for shelving, there are several grades to consider. Economy grade may have only four layers. For stronger plywood, count the layers. If you count more than four, the plywood will be stronger. Shelving made from 3/4-inch fir plywood with four or more layers will easily hold up to 50 lbs or more without sagging if the shelf is no more than 36 inches in length.
Pound for pound, solid wood is stronger than plywood -- but the cost is also more. If you can purchase 3/4-by-12-inch fir lumber at bulk prices (rarely) you can use it for shelving. The problem with fir is its proclivity to split when you shoot or hammer nails or screws into it to secure it to the wall or brace. Solid hardwood panels are the strongest shelf material available, but they are also prone to split, and are more expensive. One advantage to hardwood shelving; it reflects craftsmanship.
For smooth, strong shelving nothing beats composite wood products like MDL, (medium-density laminate) and MDF (medium-density fiberboard). MDL or MDF in 3/4-inch thickness will easily support 50 lbs on a 36-inch shelf without sagging. MDL also needs no finish as it comes complete with plastic veneer that lasts forever. MDF is slick and smooth. It finishes like glass and will also last for years. It should also be noted that, when shooting or firing nails into either one of these products, it's advisable to pre-drill to prevent splitting.
Depth and Bracing
Standard shelf depth is almost always 12 inches. This is the dimension that most shelves are rated for weight capacity. With this in mind, sag-proof shelves can be installed anywhere if braces are placed no further than 36 inches apart. Shelves should never be made using any material that is less than 3/4 inch thick. Exceptions to the rule might be small hobby shelves, display shelves or CD shelving that can be made from 1/2-inch plywood, solid wood or composites.