Apple has documented this feature on their website:
'''Adjust the brightness of your backlit keyboard '''
[https://support.apple.com/kb/HT202310]
If you can't adjust your keyboard's brightness manually, it's likely because you're in a very bright environment and you have your Mac set to automatically adjust the brightness. In this case, the backlit keyboard turns off. When you move to a location with less light, you can once again adjust the keyboard's brightness.