I just did some math. (The displayed hit probability is hopelessly wrong for the monster info screen.) It depends a lot on your melee skills. Let
M = melee skill = base + 3*to_h bonus.
AC = monster AC
Then hit probability is
.12 + (1.12.05)* (M  AC*2/3)/M.
For M = 120 AC = 150 (roughly a dracolich) you will be hitting
26%  Base
40%  With a +10 accuracy ring (or buffed with !Hero alone)
57%  Buffed with !Hero and !Berserk
62%  With all 3 bonuses
So without buffing (Note: not recommended against high AC), your damage improves by .14/.25 = 56%. With heavy buffing, it increase by 9%
For a decent midgame damage output of 50 per blow, that corresponds to 26 and 5 damage per blow, respectively. Of course, if you're using Sting or Harradekket, the numbers are much lower.
TL;DR:
For good melee compared to level appropriate AC, the value is about 2:1 to_d:to_h
For poor melee, always choose to_h.
