The movie is likely from the seventies and I saw it as a kid.
Takes place in post-apocalyptic Earth, or at least the desert. There is a large fortress-type home where the protagonist lives, and he goes out freely during the day, but must return home by night time. At night, lights shine brightly around the fortress and hooded beings try to get in, but they are turned back by the light. When there is some kind of power failure, the beings are able to infiltrate the home fortress.
Thanks for any ideas you might have!