Wookieepedia page on droids says that droids were not able to sense the Force (they quote children book What is a Wookiee? on that).
As for R2-D2 and this particular scene. According to novelization, R2-D2 activation was prompted not as much by presence of Rey, as it was by people around saying that they have part of map to his old master and Empire had the rest:
“Kylo Ren said that the segment held by Beebee-Ate is the last piece of the map that shows the way to Skywalker’s location. So, where’s the rest of it?”
“The First Order has it.” Rey looked over at him. “They extracted it from the Imperial archives.” (…)
So intent were they on the current conversation and its possible ramifications that no one noticed that a light had come on atop a small R2 unit shoved back among the rest of the equipment in the room. Nor did they see that its hemispherical head had turned to look in their direction. (…)
“What’s he saying?” she asked.
The protocol droid explained. “If the information you are seeking was in the Imperial archives, he believes he may have cataloged that data. He’s scanning through it now.”
In Star Wars universe, droids were capable of some sort of emotions (see Wookieepedia page linked above). Below is my interpretation of what happened.
In the same scene in novelization, C-3PO says "Artoo! What—what is it? I haven’t seen you this functional since—". We never learn when R2-D2 went dormant, but we can guess that being left by Luke had huge impact on him. He probably went into some kind of stand-by mode where he could still perceive the outside world, but did not interact with it actively. Only when he "heard" that people outside are somewhat close to finding location of his master, he decided to act.