Please see this related answer where this is discussed, although is a slightly different context.
There have not been many cases on this subject, but it appears that, at least in the US and EU, a person is free to post web pages that link to others without permission and indeed against the wishes of the operator of the destination site. However, "deep linking" that bypasses a login or other access control page, or an advertising page that visitors who enter via a home page would be expected to load, particularly if such deep linking deprives the destination site of revenue, may constitute copyright infringement. "framing" a linked page so that it appears to be part of the linking site, may also be copyright infringement, and might also be actionable under trademark law. See Nolo's page on Linking, Framing, and Inlining And the Wikipedia article on Deep linking
In Intellectual Reserve, Inc. v. Utah Lighthouse Ministry, Inc, 75 F. Supp. 2d 1290 (D. Utah 1999) deep linking was held to be contributory copyright infringement. See The Wikipedia article on the case In that case, the content being linked to had been posted without the authorization of the copyright holder, and no fair use issue was raised by the defense.
In general, courts have found that publishing a page on the web invites others to visit it and link to it. In the Wikipedia article on "Deep linking" (linked above) it is said that:
In a February 2006 ruling, the Danish Maritime and Commercial Court
(Copenhagen) found systematic crawling, indexing and deep linking by
portal site ofir.dk of real estate site Home.dk not to conflict with
Danish law or the database directive of the European Union. The Court
stated that search engines are desirable for the functioning of the
Internet, and that, when publishing information on the Internet, one
must assume—and accept—that search engines deep-link to individual
pages of one's website.
In Perfect 10, Inc. v. Amazon.com, Inc. 508 F.3d 1146 (9th Cir. 2007) a US court held that links to copyrighted images as part of an image search were not copyright infringement. The Ninth Circuit court of Appeals held that Google's display and caching of thumbnails was fair use, mainly because they were "highly transformative."
However, a ToS or ELUA may be a legally binding contract between a site operator and site users. If it forbids linking, that may be enforceable, depending on the laws of the country where suit is brought. Owners of publicly accessible databases are permitted, under EU law, to impose and enforce access restrictions. See the case of Ryanair vs PR Aviation brought in the European Court of Justice.