If my character is elevated above a creature (on a table, rock, etc.), is there anywhere in the Player's Handbook or Dungeon Master's Guide that states I gain advantage for my attacks? Do attacks against me gain disadvantage? Do these rules apply for ranged attacks as well?
It is in the hands of the DM.
You usually gain advantage or disadvantage through the use of special abilities, actions, or spells. [...] The DM can also decide that circumstances influence a roll in one direction or the other and grant advantage or impose disadvantage as a result. (PHB 173)
Consider granting advantage when: Circumstances not related to a creature's inherent capabilities provide it with an edge. Some aspect of the environment contributes to the character's chance of success. (DMG 239)
Granting Advantage or Disadvantage based on the environment is encouraged, but the actual decision rests with the DM. Whether being 2 steps higher on a staircase is enough to gain Advantage or being on top of a tall table inconveniences you (as you cannot use your usual fighting stances etc) all depend heavily on the particular situation. 5e leaves it in the hands of the DM in those cases.
Your specific example is not listed, but the text doesn't go into many specific examples. The last line of the "Advantage & Disadvantage" section of the PHB says...
The DM can also decide that circumstances influence a roll in one direction or the other and grant advantage or impose disadvantage as a result. - PHB, p173
Page 239 of the DMG doesn't offer any specific examples, either, just general guidance.
That said, as a DM, I would not grant advantage to a melee combatant for standing on a table. I don't see the benefit of height outweighing the difficulty of swinging low - I'd call it a wash.
It not specifically outlined in the rules, so therefore it's up to the DM
This is a common enough circumstance that I personally lean towards the idea that it is not specifically called out in the PHB or DMG, because the designers don't think it really warrants it generally.
From the PHB pg 173
The DM can also decide that circumstances influence a roll in one direction or the other and grant advantage or impose disadvantage as a result.
In my (and other's) opinion, Obi-Wan probably shouldn't be granted advantage.
A least for melee there is not much advantage when attacking if you have elevation. Possibly, IRL it may grant a bonus to missile combat due to gravity, but not much of one. Having the high ground did give a small bonus to attacks in earlier editions (+1), still I do not think it warrants granting advantage.
The benefit of having the higher ground can also be realized via battlefield control, and stopping / slowing the enemy from engaging in melee, or breaking through the fighter rank to the squishies in the back.