If restarting your Macbook Pro does not fix the issue, try resetting the System Management Controller (SMC). The SMC is responsible for controlling various hardware functions, including the keyboard backlight.
To reset the SMC on Mac, follow these steps:
1. Shut down your Macbook Pro
2. Hold down the Shift + Control + Option keys and the Power button
3. Release all keys and the power button
4. Wait for 10 seconds and then press the Power button to turn on your Macbook Pro