My point on Data's role in Starfleet is this: if the issue is his right to resign, then we would need to look at the definition in the Starfleet regulations of "member of Starfleet". If there isn't one that includes a line "must be sentient being", then sentience is not an issue, because the prima facie indicia are all in place -- Academy attendance, length and continuity of service, rank, promotion ... The argument would be that Starfleet cannot have it both ways -- use him like a member, and then claim he isn't one.
I really don't see how that's a flaw in how the Starfleet judicial system is depicted, though. Plenty of institutions have engaged in hypocritical behavior when it comes to sometimes respecting and sometimes denying basic rights to people. Just look at the hypocrisy involved in saying that two gays can't marry but can make other legal arrangements for one-another, or (back in the day) that we were fighting Communism for democracy when blacks couldn't even vote.
As for the lack of delaying motions -- I think it's fair to say that that's a bit unrealistic, but I think you're running up against the fundamental creative conceits of late 1980s U.S. one-hour dramatic television. The episode wanted to be about the issues, not about the legal procedures, and it was written years before the emergence of serialization yielded long-term, multi-episode arcs on U.S. TV. "The Measure of a Man" was written in an era where, aside from two-parters, the central conflict had to be resolved within the episode. So while it's not strictly realistic, I think that's an Acceptable Break from Reality.
When I say more formal I'm essentially talking about giving Data an actual defense attorney and not have his prosecutor be his first officer. Not to mention that the judge seems to have a contraversial history with his "lawyer" so to speak. This whole thing screams inappropriate to me.
As Christopher has demonstrated, this is simply a facet of the fact that it's a military court, not a civilian court. That which is "inappropriate" in a civilian context is not automatically so in a military context, and that doesn't make it any less "formal."
Edited: And yeah let's take that line that Star just brought up when she says "Data is a toaster."
If I were Data I would be doing everything in my power to get this thing to Earth somehow.
Here is something else I would do If I were Data. I would try to write my "congressman" so to speak and get the story out to the public.
That brings up an interesting question -- of which Federation Member is Data legally a resident? We know that Omicron Theta was considered an "Earth colony" -- presumably that means that Omicron Theta was considered part of United Earth's territory within the Federation, in the same way that Long Island is considered part of the State of New York's territory within the United States. So I'm guessing that Data would be represented on the Federation Council by the Federation Councillor from United Earth. (I have no idea who his United Earth MP would be, though -- assuming that the Parliament of United Earth uses single- or multi-member districts for each MP, that is, rather than electing all MPs on a U.E. "at-large" basis.)
But, that brings up another question:
Has Data ever pursued legal recognition as a United Earth and/or Federation citizen? Has he ever registered to vote? Has he ever applied for or received a Federation passport? If Data has never pursued legal recognition as a citizen from the Federation and United Earth governments, his case may hit another stumbling block.
(I would think that even if Data had not pursued overt recognition of Federation citizenship, though, that would still be his strongest recourse. It seems improbable that Data was issued a "Federation green card" upon being brought to Federation core territory by the U.S.S. Tripoli, so even if he was never issued a United Earth "birth certificate" or equivalent, or was never given a Federation passport or registered to vote, the lack of a "green card" equivalent would, I would argue, constitute an implicit if not overt acknowledgement of Federation citizenship.)
I'll buy into your premise about military court as I spent most of my career in the military but those courts aren't all that different to be honest. There is the UCMJ thrown into the mix. The context in which this hearing took place is odd. Having your CO and XO square off over your Humanoid rights is ridiculous in any court.