Open the Settings app, then go to System → Gestures → Quick Tap. Turn on the feature by pressing the Use Quick Tap button. Scroll down, then tap the Toggle flashlight option. Double-tap the back of your phone to make sure you see the Quick Tap detected notification.