Thanks to "The Keith" for his comment regarding what a legal guardian is. Honestly, I wasn't aware of the specific legal definition there!
This does, of course, put the question about why Oliver Queen and Bruce Wayne would've been named legal guardians of Roy Harper and, especially, Dick Grayson, respectively.
Since I don't recall the specifics of Roy's becoming Ollie's ward, let's look at Dick Grayson's case, as regards what I'm familiar with as well as what I recall has been presented in the comics.
I'm sure you all know how Dick got orphaned... he performed with his parents as the Flying Graysons in the circus, his parents knew too much, and their trapeze was altered so they'd be killed in what would appear to be a performance-related accident.
Somehow, it's decided that Bruce Wayne would take whatever form of legal custody was decided upon (which is rather bizarre, on the face of it... Bruce has no background other than having his own parents killed that would make him qualified for this, and I can't see that the Graysons would've had enough money that they'd need Bruce to use his business acumen -- which, so far as the public is concerned, is zilch -- to take care of Dick's financial decisions.
We also know that Dick had at least one living relative, post-Crisis... Aunt Harriet. At least, I'm pretty sure it was established that she was Dick's aunt, anyway. A quick stop at Wikipedia confirms this.
A cross-reference in the Dick Grayson entry for "legal ward" comes up with this:
In law, a ward is someone placed under the protection of a legal guardian. A court may take responsibility for the legal protection of an individual, usually either a child or incapacitated person, in which case the ward is known as a ward of the court or a ward of the state.
A famous ward from pop culture would be Dick Grayson (Robin), who was first introduced as the ward of Bruce Wayne (Batman). After his acrobat parents were killed, Dick was not adopted by Bruce Wayne but rather placed under his care.Now, this does kind of muddle things up, because it is specifically noted there (as it was probably in the comics) that he's Bruce's ward, but not specifically that Bruce was Dick's legal guardian. It's entirely possible that, inded, that is the case.
But I'd make the argument that, under the circumstances, no judge would possibly okay such a placement. After all, Bruce is a wealthy playboy who lives in a big mansion by himself with his butler, Alfred, and he's pretty much turned the day-to-day operation of Wayne Enterprises (or whatever it's called at various times) to other people, such as Lucius Fox. Perhaps this was mentioned in a specific story somewhere that explained why this happened... we do know that Bruce Wayne has never been one to let legal difficulties get in the way of doing what he needed to do; indeed, when he was a young lad, not too long after his parents were killed, he got hold of the paperwork concerning his being orphaned and destroyed what was necessary to prevent him from being placed anywhere.
But I think it'd be more likely that, instead of saying that Bruce bribed a judge to allow him to take custody of Dick, that perhaps he managed to place the necessary paperwork in the system overnight (because he's that good) that would make him appear to be a qualified foster parent, which I'd imagine would clear the way to at least temporarily place Dick in his care.
Given the close relationship Bruce and Dick developed, it's not hard to imagine that Dick's social worker would've been impressed with how well Dick was doing there, and would naturally okay it being a permanent placement, even if Dick was never officially adopted (something I recall Dick asking Bruce when Jason Todd was introduced in the comics, but I digress).
As always, differing viewpoints are welcomed!
Jon