It would depend on how much you talk to this girl on IM in the first place. If it's a daily thing then I can't see anything wrong in just asking her.

If you don't chat to her often then I think it better to ask her in person.

Also keep in mind where you're asking her out to? Her parents will want to know as well so perhaps for the first 'date' keep it somewhere simple and perhaps in a group?