For starters go through your social media foot print and really look at what you've posted, and what you've liked and or shared. Think about where your applying for, anyone with any form of anti religious views or posts either hide them unfriend/follow them.
Social media is highly watched, and i know of at least one definite case of a security clearance renewal being denied due to social media postings.
It can also be down to mistakes and or crossed wires, we've had a torrid time recently for people failing security checks. Which can be annoying trying to get answers, you can feel like your dealing with a faceless organisation.
Wait 6 months and reapply, see if you get a more positive result.