Those charts are a mapping of output gray level versus input gray level. A linear 45 degree line means that the output is the same as the input. Changing brightness is like raising or lowering the line so the output is brighter or darker than the input. Changing contrast is changing the slope of the line, which controls the range of the values, so like an input range of 100-120 (very narrow low contrast image) can be mapped to 0-255 (a much wider range and more contrasty image). Changing gamma is related to how much it emphasizes different ranges. If it goes up and flattens out (gamma charts on the left) the dark input range is expanded (making it more visible) while the bright contrast range is compressed. This is good for making dark parts of the image more visible. If the curve curves the other way, it makes the bright parts more visible and compresses the range of the dark parts of the image.