According to the Jerusalem Talmud (Yoma 43:3), the perpetually oil-lit lamps of the Menorah in the Temple all went out of their own accord about forty years before the Temple's destruction by the Roman in 70 CE, with the death of one "Simeon the Righteous." That makes it contemporaneous with the earthly life of Jesus if not with his ministry itself. It may well be that said Simeon is the man described in Luke 2 as the one who felt free to die now that God's promise to him had been fulfilled by his seeing the (then-infant) Messiah. But even if they aren't the same man, the theme of oil and lamps is the same as that of the parable Jesus tells in today's Gospel and reminds us of his message's urgency.
The English metaphor: "keeping a candle lit" is used as a way of saying that a person keeps alive in their heart the hope that their beloved will return (even when, as is often the case in foiled romance, the hope is unrealistic). Jesus uses the metaphor of the virgins' oil lamps for essentially the same purpose, with himself as Bridegroom being the one eagerly awaited and the virgins being the bridesmaids at his wedding with his Bride, the Church. But the lamps are supposed to be lit, not tossed aside, when the Bridegroom comes. Why? Because the oil, a sign of the Holy Spirit's anointing of the chosen, thus and also signifies grace: one's participation in the divine life. Only if one has the oil, the grace, which is life in the Spirit, can one be adequately prepared to receive and celebrate the consummation of God's love for his people. If, like the foolish virgins, one runs out of oil while awaiting the Bridegroom, one might well find that he arrives while one has run off to obtain more. In other words, only if one takes care to persevere in the divine life Jesus wins for us by his death and resurrection can one expect to join that eternal wedding known as heaven. (Better than sex, which is only a foretaste.) One cannot wander off into sin and be confident of fixing things before one meets one's Maker.
Now Matthew was writing for an essentially Jewish-Christian audience after the Temple's destruction. His inclusion of this parable thus intimates to his audience that the Menorah went out because the Jews were not ready to receive their Messiah. But such a conclusion, inevitable as it is, should not tell us that the Jews as a whole are any worse than Christians as a whole. They are not.
The history of the Jewish people, from Day One of God's covenant with them, has always seemed to me a living metaphor for that of humanity's relationship with God, both individually and collectively. It helps to make real what it thus signifies. One thing thus signified is that, in our lives as individual believers, we can make an idol of religion that closes us to the purpose of religion: i.e., our becoming by adoption what God is by nature. But we don't get it; we think mostly in worldly categories. Since Jesus was not the military and political Messiah the Jews expected, most rejected him; unfortunately, the same holds in each of our lives as Christians. We often ignore the Spirit's gentle promptings and become more like the rest of the world than like the one we ritually call "Lord." We let our oil run out and thus run the risk of appearing before our Maker clutching at nothing to celebrate with.
I know I've done that many times in my life. We all do, for we are sinners in constant need of repentance and renewal. That's why church is such a scandal for so many, so chock full of "hypocrites," as it surely is. But it shouldn't be a scandal: if you find a perfect church, join it and it won't be perfect anymore. The work should begin with ourselves. We need to pay whatever we must for our oil and keep our lamps perpetually lit.