As a general point, email and linked in are very different tools. Personally, I find linkedin doesn't have much weight in academia. I realise people use it, particularly in business areas, but I don't think many academics use it much for social networking with other researchers. Social networking tools for academics is an emerging area. Researchgate has improved a lot in recent years and is starting to get more popular as a place to share research and connect with other researchers. So in general, being on sites like this may help a little with connecting with other scholars.
That said, publishing good work in good journals, going to conferences, forming meaningful collaborations and so on are going to do more to improve your social networks.
If you are going to contact someone by email, you don't want to waste their time.
So, if you are legitimately wanting to connect and form a collaboration with an academic and you think that they might be legitimately interested, then by all means send them an email. This site has various tips for writing such emails.
More generally, there is the question of when you should contact people who work in a department when you are applying for a job in that department. I think this can be a good strategy but it depends a lot on how it is done. And it's definitely easier if you know someone in the department or you know someone who knows someone. If you can have an informal chat with a contact in the department, you might learn something more about the school to help you decide whether you want to apply, determine how competitive you are, or help you to frame your application. They may also be able to assist you in meeting others.
That said, you don't want to waste people's time, and you don't want to come across as someone who wastes people's time. I'm also mindful that for some positions there are hundreds of applicants for one position, and if every one of them contacted people in a department, it could be a huge issue.
Also, remember that some employers (universities included) wont let you know that you did not get the job. Or if they do, they may take a long time to let you know.