Ray Palmer is a pretty good hacker. A few episodes ago he traced Felicity's phone to tell her about the kissing. He might have seen a room under the bar but just decided to go to the bar. He would be interested so he would hack Felicity's phone and computer until he finds out why there's a room hidden under the bar. He finds out about Oliver and The Arrow and he would try to show Felicity his costume thinking she might let him join the team with The Arrow but things didn't work out so great.
He would track Oliver by himself but find out that he is out the country and so he would follow Oliver to the country. He then finds Oliver on the ground bleeding. And he tries to be a hero.