In (very) short: enzymes are necessary for life. Cytoplasm is necessary for enzymes to function. Water is necessary for cytoplasm to exist. Cells have osmotic membranes.
Given a cell in a solution (even a goopy one, like jam) with a very high concentration of sugar, water will move along a gradient of low to high sugar concentration, in other words, water will move out of the cell and into the jam, thus stopping all major activity in the bacterium (basically stopping it from reproducing, if not exactly killing it. The killing actually comes from heating the jam and canning it while still hot enough to kill most bacteria.)
Plasmolysis: The shrinking of protoplasm away from the cell wall of a plant or bacterium due to water loss from osmosis.