How to stop the brightness of MacBook Air Display from fluctuating?
The first thing I would try is to disable auto brightness: System Preferences → Displays → uncheck Automatically adjust brightness.
If that doesn't work (or if it does and you still want auto brightness), try resetting the SMC (System Management Controller) — the SMC controls many hardware features of the Mac and resetting it can fix such problems.

Lights

The display backlight doesn't respond correctly to ambient light changes on Mac computers that have this feature.


Source: https://support.apple.com/kb/HT201295

Shut down the computer and connect the power adapter.

Press ⇧⌃⌥ and the power button, then release them all at the same time.
The Mac shouldn't boot and will remain off. The LED on the MagSafe connector may change colour and/or flash briefly.

With the charger still connected, press the power button to turn your Mac back on.