Imagine yourself in a frosty, barren field. It's windy, it's damp, and everything you see is either gray or brown. Or grayish-brown. Your jacket is inadequate protection against the biting wind, and you're probably hungry, to boot. Got it? Are you shivering yet? You've just imagined your way into the setting of Burns' "To a Mouse."
Winter in Scotland is no joke—it's drizzly there at most times of the year (which is why it's so green and beautiful in the summer), but in the winter, when the drizzle turns to sleet or snow, it can be downright miserable. And if you're a poor farmer in the late 1700s, or a mouse in any century, your house is probably not much protection against the wind and rain. And if it's late November, you're looking at another four (or even five) months of rotten, soggy weather. Four (or even five) more months of wet socks and the constant drip-drip-drip of cold water from the brim of your hat down your collar. Wow. No wonder the speaker of this poem stops in his work to commiserate with the poor, shivering mouse—he knows what it's like to be cold and wet for days and weeks at a time.
In that way, the setting drives the farmer and mouse together. Think about it: climate is the great equalizer. Rich, poor, human, animal—when it rains, everyone gets wet. When it's cold, everyone shivers. Those are the realities of the poem's setting that help to link the speaker with the mouse through their shared experience of the world around them.