So, if you've added mods that add light sources to Riverwood, then that's the cause of your issue. As someone said above, the engine is limited and light-flickering will happen if too many lights are in the area. Several mods add light sources to Riverwood (JK's Skyrim, Lanterns of Skyrim, Medieval Lanterns, Tamriel Master Lights, ELFX Exteriors, etc). The lights turning on/off in front of Alvors house is very common with too many light sources. Seems to work well so far - at least for me. I'd recommend Lanterns of Skyrim II instead if you want more exterior lights. While it's nice and all, it can cause too many shadow casting lights in specific situations - especially if you have other additional light sources. I'd suggest to disable ELFX exteriors and see if this helps. Believe me, I redid the (IMHO messed up) interior lighting for some house mods myself.
Unfortunately the game sometimes makes some strange choices when deciding which shadow casting lights to render and which to ignore.
AFAIK, this is 'hardcoded' and can't be changed.
The game won't render more than 4 shadow casting lights (non shadow casting light sources are okay) at the same time. Regarding the flickering lights: This is an engine limitation of both Skyrim LE and SE. Usually you can get an answer from experienced users or even RUDY himself. For the lights being too bright, you could ask nicely in the comments section of RUDY ENB.