Whether you choose nuts in the shell or shelled is mostly a matter of convenience. Nuts keep better in their shells, but they do require cracking before you can eat or cook with them.
Most shelled nuts sold in vacuum-sealed cans or jars or in cellophane bags can be found in supermarkets year round. Fresh tree nuts in the shell (such as walnuts, pecans, and hazelnuts) are more seasonal and most available in the fall and early winter.
Nuts in their shells are sold raw, that is, unroasted. Raw nuts have the advantage of no added fat, but their flavor is rather bland compared with that of roasted nuts, and once shelled they do not keep as well as roasted nuts.
When buying packaged nuts, look for a freshness date on the jar, can, or bag. The kernels, if visible, should be plump and uniform in size. If you buy shelled nuts at a candy store, health-food store, or other bulk source, be sure that they’re crisp and fresh, not limp or rubbery, musty, or rancid smelling.
When selecting nuts with shells from a basket or bin, choose those with undamaged shells. Look out for cracks, scars, or tiny wormholes. Nuts should feel heavy, and the kernel should not rattle when the nutshell is shaken. If the nut rattles, the nut meat inside may be withered and dry.