How does the F-16 side stick convert pilot input to an electrical signal?
The stick measures force by using strain gauges. These work by measuring the change in electrical resistance caused by stretching or compressing the thin metallic foil, which is bonded onto the stick shaft.

An accurate setup requires two strain gauges at opposite sides, which are measured using a Wheatstone bridge: the difference in resistance of the two gauges is used for the force signal. 

There are other ways of measuring input force, but none are more accurate than the strain gauge/ Wheatstone bridge setup which can measure force in both directions and has little to no hysteresis.