In 2013, David F. Sandberg made a little horror short film "Lights Out" for an online Horror Short competition. The film not only won, but became a viral sensation. Not too long after that, Sandberg started getting calls from Los Angeles from agents and managers.
Fast forward to Sandberg sitting in an office with James Wan (The Conjuring, Saw) talking about making "Lights Out" into a feature.