It depends on the sound.
Union *sounds* like it starts with a Y (and although sometimes Y is a vowel, I don't belive there are any words that START with a Y where the Y is used as a vowel) Therefore, "A Union"
Hour starts with an "ow" sound... therefore, "An Hour"
Obligation starts with an "ah" sound, therefore "An Obligation"
Once you break it down to the SOUND a word starts with, it makes sense.
The word "An" is probably so your tongue doesn't get as confused, going from a vowel sound (a) directly into another vowel sound (hour)... having a consonant there allows you to "close" the word and continue on, acting as a break between words and sounds. "An Hour" is certainly much easier to say than "A hour"... if you say them out loud, you can hear that in the first one, the words are distinct, but in the second, they kind of run together.
Aesthetically, it makes sense too.... because even if you run it together... "Annnnnour" your brain still picks up the two words... whereas "ayyyyyyyy-our" doesn't "separate" the words.
I should have been a tholologist (your "word for the day").
Just my 2¢
"In order to start solving a problem, one must first identify its owner." --Me
--Greg