The book author has never explicitly stated that Divergent is an allegory
Given that the movie is pretty loyal to the book, let's start with looking at that. Author Veronica Roth wrote on her official blog that the faction system had a number of inspirations:
I have a thing for groups, and I always have. It interests me in speculative fiction, whether it's the houses at Hogwarts or the armies in Ender's Game or the houses in Kushiel's Dart (which I didn't read all of, because it made me blush too much, but the house thing kept me going for awhile). I also have a long-time (now abandoned) obsession with personality tests, especially the Meyers-Briggs personality tests (depending on the day I'm an INFJ, INFP, or an ISFJ. I've forgotten what all those mean, though), and the enneagram (I'm a number 1: The Perfectionist. Now that one never changes. Ha). And I've always been interested in government systems that stick people in classes or castes (even if I'm also pretty horrified by them), or high school cliques, as depicted so well in Mean Girls
Note that Roth is pretty clear on these being inspirations, but never says that her book was intended to be an allegory of, or representation of, any of these categorizations.
Third parties have suggested that the book and/or movie is an allegory for various things
Astrology
Online magazine Astrology Hub published an article about how the five factions is a (potentially accidental) allegory for the five visible planets.
Little did I know that I’d be watching one of the best explorations of the astrological allegory to be filmed in recent times. […]
Though she may not have realized it, Roth’s faction system taps into an equally old classification system — the five visible planets: Mercury, Venus, Mars, Jupiter and Saturn — which probably accounts for their deeply resonant appeal. [...]
And though you may have been “born” into one of the factions, to become more “divine-like” (read fully actualized) [in ancient Greek astrology], was to embrace all of the planet-factions. Embrace them in order to transcend such limitations.
In other words, to become cosmically Divergent.
Bisexuality
LGBT-interest magazine The Advocate wrote an article suggesting that the movie is a bisexual allegory.
The film’s familiar story of the struggle of outsiders born different from those around them will resonate with many LGBT viewers who have been drawn to similar allegories found in films like X-Men, but it’s Divergent’s theme of difference through the multiplicity of one’s identity that has the potential to strike a strong chord with anyone who is bisexual.
“The five factions represent the basic levels of conformity and a divergent fits into not one of them, but multiple,” James says as he examines the perceived subtext once more aloud. “Yeah, I can see it. That’s interesting.”
Christianity
Motivational speaker and author Sheila Gregoire writes on her blog that Divergent is an allegory for Christianity.
The author, Veronica Roth, apparently started them when she was only 19, and sold them in her early twenties. She is a Christian. The books are not–outwardly. But I have never read such a good Christian allegory as these books. I truly believe Divergent is a Christian novel. The central question she is asking in the series is this:
Is it possible for humans, on their own, to overcome original sin?
And the conclusion? Nope.
Final Thoughts
SparkNotes, a company that puts out literary study guides, doesn't make any claims about there being any overt allegories in this book/film. I would think that if there were any obvious allegories, it would have been pointed out by a company like them.
I personally think that these sorts of allegories in Divergent are just as speculative (and baseless) as Star Wars: Revenge of the Sith being an allegory of George W. Bush, The Hunger Games being an allegory for Donald Trump, or Lord of the Rings: The Two Towers being an allegory for the September 11th attacks. People see all sorts of allegories that were never intended, but to paraphrase George Lucas, these sorts of parallels happen all the time throughout history and our lives, so it's natural that people would make unintended connections.
For what it's worth, author Veronica Roth shared her thoughts on allegories a few years before writing Divergent:
Also: just because what you write doesn't have some deep allegory embedded in it, doesn't mean it's not important. If it affects someone in a positive way, that's important.
Does this mean that she didn't plan to add a deep allegory for Divergent? I'll let you decide.