Troubleshooting guide
How to fix the problem
System Settings > Keyboard or keyboard lighting controls (if supported by the device); reduce to zero.
If the problem persists
Check if your model has a backlit keyboard at all. If you can't find the brightness control, look for it in the settings of your specific macOS version; an external keyboard may have separate controls.
Request a repair