This is a bug that was introduced with macOS Sierra, and continues to come back after major updates such as 10.12.1, 10.12.2, 10.12.3 are applied

After upgrading or updating macOS Sierra on a laptop, the screen will rapidly go to sleep about every 15 seconds or so

The solution is simple, just reset the NVRAM on your laptop
https://support.apple.com/en-us/HT204063

Computers affected:
MacBook Pro
MacBook Air
MacBook