Luke only fully understands what R2 says when in the x-wing cockpit where a little screen shows text of what R2 is saying. Outside of that, neverar is right in that he only understands the general tone, but not the words.
As for Rey, it seems Poe also fully understands BB-8. I just chock it up to a new model that’s been made with a more easily learned droid language. I mean,the first iPhones didn’t have voice recognition or Siri. Now everyone’s phones can listen and talk back…