“The house sat hard by a small stream.”
It did what? Did it fall from the sky, like Dorothy’s farmhouse, and “sit hard” on someone?
Nothing nearly so exciting, I fear. This phrase means simply “near.” My copy of the Shorter Oxford English Dictionary on Historical Principles tells me that this usage of “hard” (with “by”) is archaic and dates to 1526. The meaning of “hard” is “close, of time or place,” but the sense of “of time” is no longer used.
Specifically, this entry tells us that “hard” here is an adverb, and “by” a preposition and an adverb. First, “hard by” can mean “close by, close to, near to” said only of place, like the house in my opening sentence. Second, it had been used to mean “close at hand in time” circa 1535. That sense, as I said, is obsolete now. Were I to see it in a historical piece, though, I’d consider leaving it if the time and situation were appropriate.
One problem I have run into with this phrase is overuse in historical fiction, in an attempt to “get the feeling right.” Even there, it’s possible to overdo the period speech. Sprinkling a few “hard bys” around is one thing; using it every time “near” would work as well is another.