I'm not saying I agree with his choice. I'm just explaining what he did and why, as I understand it. A lot of people watch that scene and wonder what the hell Obi-Wan was thinking.
I thought it was pretty obvious. He looks right at Luke, he smiles just a bit, switches off his light saber, and lets Vader take him out. But there's no body. Next scene, you hear his disembodied voice. Kinda creepy, actually. But Obi-Wan probably figured he couldn't take Vader in a fight, so he might as well use the time he had the best he could. If he'd won, Vader would be dead and we'd have no story, so obviously he wasn't going to win. If he'd somehow gotten out of there, he still would've been a liability to their cause. Another person on board, another person to get from Point A to Point B, and he really didn't seem that interested in the rebellion in the first place. He seemed little more than curious about R2D2, and decided to help Luke and the others, but he'd done pretty much all he could do.