Symbolism, Imagery, Allegory
This here's a tricky one. Because, you know, we don't actually see that many castles, unless you count Stormhold, which is more of a fortress/tower in the mountain as far as we can tell.
But there are all these references to castles, both as nouns and verbs, so though castles proper are scarce, clearly they're doing some important work in this book. When Tristran and the hairy little man are stuck in the serewood, for instance, the man makes this remark:
"I could castle […] but there's no one I could castle with'd be any better off here than we are […] There's no escape by flying, not judgin' by that thing." (4.71)
For the sake of clarity, "that thing" refers to a bird skeleton. More importantly, though, is the use of the word castle. If you're a Chess player, then this whole idea of castling as something to do rather than an enormous building might already be familiar to you. On the off chance that you're not the next Bobby Fischer, though, to castle is, essentially, to swap places in Chess. So the little hairy guy is saying that he could physically switch spots with someone else. Unfortunately, though, he doesn't think it'd do any good, so we don't get to see this in action.
Chess logistics and disappointments aside, though, we see castling here representing a connection. While we don't know a whole lot about it yet, it's clear that the hairy little man isn't in this world alone—he's part of some sort of network that he can reach out to.
In Chapter 8—titled "Which Treats of Castles in the Air, and Other Matters"—we again fail to see an actual castle. Instead we meet Captain Johannes Alberic who flies an airship. In a convo with Tristran, Alberic traces an image of a castle in some condensation, and tells Tristran that it's something of a fellowship. So again, we see castle symbolizing connection.
It's worth noting that Alberic's first mate, Oddness, is "a quiet gentleman with wings" (8.92). So maybe—just maybe—the little hairy man's earlier mention of how flying wouldn't help them get out of the serewood is a reference to Oddness being a member of the fellowship, too. We don't really have a way to confirm this, but it seems likely enough that we figured we'd toss it out there for you to mull over.
Finally, in the epilogue, we learn that "after Tristran's death, there were those who claimed that he was a member of the Fellowship of the Castle, and was instrumental in breaking the power of the Unseelie Court" (Epilogue.17). Color us confident, then, that castles and castling in Stardust represent solidarity and connectedness. Though there's nary a castle in sight, this still makes perfect sense. After all, castles are defense structures where people come together to work toward common goals. Just like, say, a fellowship.