There are multiple approaches to achieving a desired outcome, such as controlling the amount of light in a window. The information on how illuminated a window should be can be stored at various stages of your program. One common approach is to use instancing when working with similar meshes but with different settings.
By creating a blueprint and adding a mesh to it, you can modify the mesh using code and other features. Another option is to include code in the material editor, which can also alter the appearance of the window.
For a shader / material approach you can use the world position and a random texture to blend the values and thus getting a value that can determine the lightness value of the window.
If you use a blueprint approach you can use a random float that is generated when the mesh is setup. This value can then be connected to the material and alter the lightness.