I presume you are referring to the "bit depth" of an image.
The standard used to be 8 bits per channel (aka, "bpc"). If you are not doing any major tonal or color transformations on an image this is adequate. Typical examples of this are well-lit studio shots (ie, with well-controlled contrast, good colors, etc.).
However, if you are making major adjustments, or even just to be safe, work in 16 bpc. An example of a "major adjustment" would be bringing up the shadows in a backlit scene.
16 bpc is now the de facto standard for all serious photography. It avoids most of the banding / posterization problems that were common at 8 bpc. As of a few years ago, almost all plugins were updated to work at 16 bpc.
32 bpc is a specialty format. It is used almost entirely for HDR photography and 3d modeling, ray tracing, rendering, etc. Very few plugins or even the native tools work at 32 bpc.
As you pointed out, for for compatibility with web standards, you have to output an 8 bpc file. Make the transformation from 16 bpc down to 8 bpc as the very last step in your workflow and you'll be fine.
HTH,
Tom M