Basically, the Inns of Court are a hangover from the days when all voctional legal training (for the Bar) was conducted by the Inns of Court only (i.e. no BPP, College of Law, etc). For qualified barristers nowadays, as they did back then, they primarily serve a social purpose. As a member of an Inn you can go to all their dinners, parties, competitions, trips, etc, etc.
However, it is still compusorly for anyone wanting to qualify as a barrister to be a member of an Inn. You cannot complete your BVC and be called to the Bar without being a member of one of them. Educationally, they are in fact very useful. They frequently put on advocacy seminars/training sessions and mooting and debating competitions as well as other social events specifically for students. I for one will be a member of Middle Temple in a couple of months (they frequently put on events and lend barristers for events for King's law students, so I assume there is some sort of 'special relationship' there!).
Oh, and also they provide scholarships for various things

Edit: It's not really 'necessary' to join an Inn until your third year (if you plan to move straight onto the BVC). However, there are benefits for joining earlier - particuarily if you're a London student.