There are a number of reasons why indoor farming with artificial light could be a necessity. Space colonization, a runaway blight or pest that we can't stop without isolation, something causing large amount of solar radiation blocking particles in the air like nuclear war, a large asteroid impact, or a super volcano.
Also crops that need very specific conditions to grow might not do well as our climate shifts, and growing in a carefully controlled indoor farm could fill demand, though at a high cost.