Well I'm still in college and I know from one of my friends that another friend's father died when she was young. Now how do I react politely if she tells me that in some situation. "Oh, sorry to hear that" seems appropriate, but is there a better response?
That's as good as it gets. Responses like “my condolences”, “he’s in my prayers” and “sorry for your loss” are usually used for recent deaths, and comments like “he's in a better place now” or “at least you're doing well without him” are risky if you don't know how the person feels about having grown up without a father, or their religion.
To sum it up, “sorry to hear that” is short, polite and neutral.