Game of Thrones theories are like weeds, kill one, two more spring up in its place. Some of the speculative plot points do come to pass, like Daenerys and Jon falling in love. Some exceed the imaginations of fans, like Jon Snow not just being the son of Rhaegar Targaryen, but the legitimate heir to boot. Other theories die very timely deaths, like the ridiculous notion that Bran and the Night King are the same person. In its place, a new idea has arisen: Is Bran the Lord of Light?
There are two schools of thought on this theory. One is that Bran is "secretly" the Lord of the Light, come to fight the Night King, the "Lord of Death and Ice." It's a cyclical conflict going on for generations. To ensure a win, Bran went back in time, pushing Melisandre and Beric to be in the right place and time, while in present-day handing Arya the right tool for a proper killing when the moment presented itself.
However, there's a second, more complicated answer, that better fits the way A Song of Ice and Fire treats history.
The religion behind the Lord of the Light sprang up centuries ago in Essos, born of a prophecy in ancient books of Asshai. Those books describe the first Long Night in Westeros to a tee. How the information got there is lost to history, but it contains the prophecy of Azor Ahai reborn. This dualistic religion of R'hllor, God of Light and Life versus the Great Other, God of Ice and Death, is merely a mythologized version of Westeros history, and the "many times" the Three-Eyed Raven and the Night King have faced off.
Bran isn't "secretly" anything. The muddled recordings of history and generations of worship merely functioned as a giant game of telephone. Unbeknownst to Melisandre, the Red God she worships is the Three-Eyed Raven, just under another name. It adds up if you consider Melisandre's magic is stronger at the Wall than anywhere else, a Wall which was built with the magic of the old gods.
It also makes more sense than Bran traveling through time making changes to win the Battle of Winterfell. After all, it's not just Melisandre and Beric who were pushed to get Arya to the right place and time to kill the Night King. Roll back the centuries, and there's Jenny of Oldstones, marrying Duncan Targaryen and convincing him to give up his claim to the Iron Throne so Aerys II Targaryen would become king. There's the "old gods" whispering to her to tell Duncan's father, King Jaehaerys he needed to marry Aerys to Rhaella so "The Prince That Was Promised" would be born.
There was the Year of the False Spring when Winter vanished long enough for a tourney to be held at Harrenhal so Rhaegar and Lyanna could meet. There's a child born who Ned is saddled with, causing him to spend the next two decades trying to make it up to his wife. The result is the Starks don't just have an heir and a spare, but Arya, Bran, and Rickon, too.
It makes far more sense all this was always the work of the Three-Eyed Raven. So his overseas worshippers call him something else. Most respectable gods have multiple names anyway.