Y is used as a vowel when it's between two consonants, and a consonant when it's not. A word like "Synchronize" uses y as a vowel, but a word like "Yellow" uses it as a consonant. Honestly, it's more vowel-like then consonant-like in every case I can think of, so maybe that rule is kind of weak, and it should be counted as a vowel all of the time...
I'm not sure that's the (sole) rule for "Y as vowel". It acts as a vowel in "fly", "spy", and a few other words. And it seems pretty darn dipthong-like when clustered among vowels, eg "voyeur", "vying".
The word "eye" is an interesting one. It seems to be only vowels, based on pronunciation.
> a vowel when it's between two consonants, and a consonant when it's not.
Not a hard rule, honestly.
Some Indian languages exhibit a blurring of sorts with Ye- sounds. E.g., in Telugu, the word for 'How' is 'yela', which is often also pronounced as 'ela'. TBF, Telugu also blurs Ve-/We- sounds similarly.