MacBook Air turns off whenever lid is closed after High Sierra update
The first thing I would try is resetting the System Management Controller.

Reset the SMC

On your particular Mac, the steps to follow are:


Shut down your MacBook Air
Unplug the power cable from your MacBook Air
For 10 seconds, press and hold at the same time the shiftcontroloption keys (on the left side of the built-in keyboard) and the power button
After 10 seconds let go of all keys and the power button 
Plug in the power cable
Turn your MacBook Air back on with the power button.


Once you've done this, test your MBA by using it as normal to see whether this was enough to rectify it.