   Sensors from your digital camera consists of millions of pixels with photodiodes which convert the energy from the light (actually from the incoming phototns) into an electrical charge. That electrical charge is then converted to a voltage which is amplified to a higher level so that it can be further processed by the ADC (Analog to Digital Converter). In accordance with the voltage value, the ADC classifies it into a number of discrete levels of brightness and assigns each level a binary label (a number in binary code, consisting of 0 and 1). The ADCs are classified by the number bits that this labels are formed of. So a one bit ADC will classify the voltage as either 0 (black) or 1 (white). A two bit ADC would categorize it into four (2^2) groups (black-00; white-11; and two levels in between-01 and 10). Most consumer digital cameras use 8 bit ADCs, allowing up to 256 (2^8) distinct values for the brightness of a single pixel. The minimum resolution (bit rate) of an ADC is determined by the dynamic range (accuracy) of the sensor. For example if the dynamic range of the sensor is 1000:1 (or 60dB) the ADC must be at least 10 bits which is 2^10 = 1024 discrete levels. This will avoid loss of information. Theoretically a 10 bit ADC is the perfect fit for this dynamic range (1000:1), a 12 or 14 bit ADC will not generate additional tonal information other than noise. However, in practice it makes sense to overspecify the ADC to 12 bits to allow for some margin of error on the ADC.  It is also useful to have extra bits available to minimize posterization or banding when applying the tonal curve to the linear data.
Often, marketing material advertises the bit rate of the ADC to suggest the digital camera or scanner is able to output images with a high dynamic and tonal range. From the above it is easy to understand that this is only true if the sensor itself has sufficient dynamic range. The tonal range and dynamic range can never be larger than the dynamic range of the sensor.
Digital SLR cameras have sensors with a higher dynamic range and are usually equipped with 10 or 12 bit ADCs. Normally such cameras offer the option to save the 10 or 12 bits of data per pixel in RAW because JPEG only allows 8 bits of data per channel.