This is a somewhat complicated issue. In one sense, researching potential employees on social media could be considered a violation of privacy and could feel uncomfortably intrusive. After all, one's personal habits, beliefs, and lifestyle have little to do with whether one can flip burgers or write computer code. Also, such research could enable employers to discriminate against, for example, women considering having children, gay and transgender people, the disabled, people belonging to minority groups or religions, and even people belonging to different political parties than the HR staff.
On the other hand, prior research is better, for a company, than damage control. Someone who regularly posts racial slurs, Nazi propaganda, or strange conspiracy theories on social media might become a liability to a company. A government branch or reliable news outlet or university might not want to hire a person whose positions or opinions they believe could undermine the intellectual integrity of the organization.
Perhaps a good compromise would be doing only regular public searches using tools such as Google, which would return information any member of the public or customer could encounter, but not looking at private material such as posts restricted to friends or demanding access to accounts, unless the job in question requires a high-level security clearance or otherwise might impact national security (e.g., positions in law enforcement, air traffic control, etc.).