Y is apparently a magical letter. It makes any sound you want, can turn boring names unique, and even transforms masculine into feminine!
I'm being facetious, of course, but our modern preoccupation with the letter Y astounds me. It's one of the rarer letters in normal American English words, but one of the most common in American names. The number of sounds it can legitimately make contributes, I'm sure, but it's hardly omnipotent. So how did we get to this point?
Well, to start off with, Y is the only letter that can function as both a consonant and a vowel. It was originally two separate letters (three if you count the thorn, but that's a different topic, and was pretty much limited to early typesetting)--a consonant that sounded just like our modern consonantal Y, and a vowel that doesn't exist anymore in English, rather like the German ü.
When English was switched from the Anglo-Saxon runes to the Latin alphabet, they were merged into one letter. Odd, but it does rather make sense--the consonantal Y is technically a semi-vowel [IPA: /j/], and the old vocalic Y [IPA: /y/] is pretty much the closest vowel sound to a consonant! Sometime in Middle English, the Y's vowel sounds shifted and merged with the I-sounds, and by the time spelling was standardized, they were considered interchangeable.
So, a rule of thumb--if it can be spelled with an I, it can be spelled with a Y (please note, that this doesn't necessarily mean that it should; changing a name's spelling is not something that should be done without lots of consideration, IMO).
What sounds can a Y make?
"ee" [IPA: /i/] like in lyric or baby (open syllables = long vowel)
"eye" [IPA: /ai/] like in style (silent e = long vowel) or sky (open syllable = long vowel)
"ih" [IPA: /ı/] like in myth (closed syllable = short vowel)
"eh/uh" [IPA: /ə/] like in martyr or Sibyl (closed syllables = short vowel, often reduced to a schwa, varies by region/dialect)
On top of that, it can, of course, form digraphs with most of the other vowels:
"ay" [IPA: /ei/] like in bay or fey
"eye" [IPA: /ai/] like in buy [rare] or Maya [in imported words/names]
"ee" [IPA: /i/] like in key
"oy" [IPA: /oi/] like in boy
Notice that, with the exception of the schwa, all the IPA representations include the letter I! More confirmation that the Y is basically a pretty I.
So, modern naming/spelling conventions aside, the Y is not a universal vowel. I realize that most people, at least intuitively, can tell when a Y doesn't work, but gosh, I've seen some doozies lately!
Now, if only I could explain why a Y-substituted boys' name is somehow feminine. That one still escapes me. :p