The Talmud understood that the main purpose of the books of Neviim and Kesuvim is to give tochacha to Benei Yisrael. If the Jewish people would not had not sinned, they would have been given only the five books of the Torah and the book of Yehoshua (Nedarim 22b). Yehoshua would have been singled out from among all the other Kisvei Hakodesh because it contains detailed accounts of the boundaries between the various shevatim. What is the significance of these accounts?
In Parshas Pinchas we learned that Hashem commanded Moshe Rabbeinu to go up to Har Hoavarim and take a good look at Eretz Yisroel before he died. The Vilna Gaon comments that studying the geography of Eretz Yisrael is a part of the mitzvah of Talmud Torah. Moshe Rabbeinu, the Ish Hahalacha par excellence, was studying the geography of Eretz Yisroel in order to complete his Torah knowledge. Similarly, Parshas Masei has a long detailed account of the boundaries of the holy land, and learning this section and understanding it is part of limmud haTorah.
The Zohar connects the fact that Moshe Rabbeinu looked at Eretz Yisrael only from a distance, to the fact that in Parshas Chukas, when Benei Yisrael were being bitten by snakes, Moshe Rabbeinu was commanded to place a copper figure of a snake on a tall pole, and all those who were bitten looked at this and were healed. Normally, for one to be cured by a medication, it must be applied to the body, sometimes internally, and sometimes externally. We are not familiar with a medication that heals simply by looking at it. The Zohar comments that only because Moshe Rabbeinu was such a deep thinker was it possible for him to both heal the sick simply by their looking from a distance at the Nachash Hanechoshes. Similarly, unlike the other members of Klal Yisrael, who needed to perform the agricultural mitzvos in Eretz Yisrael in order to reap the corresponding spiritual gains, he was able to do so by merely looking at the land from a distance. With respect to all other people, just as medications don't heal from a distance, Eretz Yisrael does not affect us from a distance.
The rabbis of the Talmud had a tradition that Eretz Yisrael was endowed with properties of kaparah (Kesubos 111a). Those who are buried there gain atonement, but those that live there gain an even greater degree of kaparah.
Eretz Yisroel clearly has an effect on the Jewish people, and the Jewish people have an effect on the land. In Parshas Behar, The Torah tells us that when the Yovel year comes, all avadim ivrim go free, and anyone who had sold his Sedeh Achuzah in Eretz Yisroel would get it back. The theme of Yovel is summed up in the pasuk, "..and thou shalt proclaim liberty throughout the land and to all its inhabitants." (This pasuk appears on the Liberty Bell in Philadelphia.) The Rabbis (Erchin 32b) understood, from the wording of this pasuk, that the laws of Yovel only apply when all the Jewish people are located in Eretz Yisroel ("Bizman shekol yoshveha aleha"). The presence of Klal Yisrael enhances the sanctity of the land.
Not only does the presence of the entire Klal Yisrael have an effect on Eretz Yisrael, but the presence of each and every Jew has an effect as well. Rambam (Shemitta Veyovel 10,2) quotes from Toras Kohanim that the sanctity of Eretz Yisrael did not set in until after the seven years it took to conquer the land, and the next seven years that it took to divide the entire land between the tribes and the individuals. Only when each and every individual Jew knew the exact location of his own personal plot of land was the Kedushah completed. If one steals anyone else's property anywhere in the world this is a serious violation. If one steals his neighbors field in Eretz Yisrael, there is an additional violation involved. He has diminished the sanctity of the land! The kedushah of Eretz Yisrael is only in its complete state when each individual Jew has his plot of land that is rightfully his.
In the opening pasuk of the book of Eichah the special relationship between the Jewish people and Eretz Yisrael is compared to that of a married couple. While the Jewish people are in galus the land behaves like a faithful wife who waits for her husband to return. Rashi, in his commentary on Parshas Bechukosai (26,32), points this out as well. In the midst of the bitter tochacha, the Torah has a few soft words, stating that when the Jews go into galus the land will remain desolate, and our enemies who in Eretz Yisrael will never really be satisfied there. The land will remain forever loyal and faithful to "her husband."