If they haven't yet offered you a job, then an employer might well consider information from your Facebook profile when making a decision. Survey evidence suggests that a very large number of employers do check the 'online footprint' of candidates before offering them a job. But this is bad HR practice for any employer that claims to support equal opportunities in recruitment, as it doesn't make for a level playing field if they know more about some candidates than others.
It may also infringe data protection laws, especially following the implementation of the General Data Protection Regulation (GDPR) in May 2018. The data protection working party in charge of the GDPR says that under the new law, “the vetting of job applicants’ social media profiles in order to consider their suitability for the role in question will be unlawful [in breach of data protection laws], unless the information is relevant to the role in question and applicants have clearly been warned that their accounts will be reviewed”. This is because employers are not looking at the individuals’ personal data in their social media profiles for a lawful purpose.
Employers are not allowed to discriminate against you on the grounds of your age, gender, sexuality, ethnicity, disability, religion or belief, or union membership, all of which they could potentially find out if you or your friends discuss it online.
In bringing a case against an employer, you would need to provide enough information to strongly suggest that the decision not to offer you the job was discriminatory, as opposed to simply because you were not the best person for the job. However, your employer will be at a disadvantage if they have discovered facts – such as your sexuality – of which they would have been ignorant had they not reviewed your online profile.