It is legal for a employers to use something they found on social media to make a decision. Certn will highlight high-risk behaviour, however, if an employer wishes to use a specific post, tweet or pin, they must ensure that the content of the post could be deemed relevant to the applicants' job. For example, threatening or violent content on applicant’s twitter profile could pose a risk to other employees and could violate other employees right to peaceful enjoyment of their workplace. This would be relevant. Applicants’ taste in music, political views, family status, race or religion, are NOT relevant to the applicants' position.
Note: We are not lawyers and cannot give legal advice on this.