I'm transcribing something in C. The chord notes in a particular bar are, in rising order, C#, G, B, E. As I see it, there are three choices - Em6, A9 (no A), and C#m7b5. None of them seems to be a good name for the chord. It comes between a C bar and a D bar, so maybe C#m7b5 is best, as a sort of V/V/V. What criteria are there for naming it?
My take is that function wins out as the most important criterion. The two best candidates are: C#m7b5 (or C half diminished, C#ø7) and A7. When we look at the function, I think A7 is the stronger choice.
A half diminished chord has the primary function of leading into a V7alt chord. For example, if the progression were:
| unknown chord | F#7alt | Bmin | then C#ø7 would be a great candidate for the unknown chord because it would complete the minor ii-V-i. (Note: if the song were modulating from C to D, then this might actually be a C#ø7, but that's not the case as you've pointed out.)
But given that the progression is
| C | unknown chord | D |, I think the best candidate for the harmony is A7, because the A7 chord serves as a V to the D chord, as you've pointed out. If C is the tonic, then this is the start of a I-VI-ii-V progression (or maybe I-VI-II-V, depending on the quality of the D chord).
There are many ways to voice an A7 chord without changing the underlying dominant seventh/mixolydian harmony. It can be voiced with the 9, it can be voiced without the root, it can be voiced with the 13 instead of the 5, it can be voiced with the 4 alongside the 3, etc. I view these changes as stylistic--voicing the chord in these different ways doesn't change the underlying dominant seventh harmony, and in all cases, the A7 chord is still playing the exact same functional role.
So the question, "what's the underlying harmony?" requires an eye on the function, in my opinion. In any given chorus, an underlying chord can have many different instantiations which would add extensions, remove notes, etc. So the approach I take is to write the underlying harmony--I write what a chord sheet/lead sheet would show. To that end, I'll listen to how the same measure is played in other choruses, other versions, etc. In the next chorus, maybe there's an A in the root. In the following chorus, maybe the 13th is included. But if I notice that the C# is always in the root, then I might notate this as A7/C#.
Functionally, the other strong candidate for this chord would be C# diminished (which would serve the same role as the VI7 chord). But as you yourself have already noticed, the presence of the B note in the chord rules out C# diminished as a possibility.
If you subscribe to the theory that wants every chord to have a dominant relationship to the one that follows, we're looking to analyse the C# as a leading note to D. So this could be thought of as a rootless A9. THINK of it as that, but WRITE it for performance as C#m7b5, else the player will be tempted to add an A bass note. Same harmonic function but different sound, hence NOT freely interchangable!