Today I finally found a satisfying setting for the light sensor (see screenshot) and I thought it was worth sharing, since the default setting was very irresponsive for me.
If you want to try it, go to Settings > CyanogenMod > Display > Automatic Backlight then tick "Use custom".
Then enter "Edit other levels", Load defaults (this should limit your levels to 5), scroll to the end of the screen, Set number of levels, select 7 and then set the values according to the screenshot.
You will notice that some values are maxed at 254 instead of 255. This is because it seems that 255 might cause issues.
Window length: 10s
Reset Threshold: 400 lux
Sample interval: 1s
Allow light decrease: Checked
Decrease hysteresis: 50%