They can be used interchangeably for the most part, except that:
- When you are talking about electing someone to an office, "elegir" is more commonly used.
- This one is subtler. When you are talking about picking one or more among a set of things or people (other than at an election), "escoger" is preferred. Thus:
Le pregunté a cuál de los juegos quería jugar y escogió el parchís.
but
Le pregunté qué quería hacer y eligió ver la tele.
You could use "eligió" in my first example or "escogió" in the second one, and it wouldn't be wrong or even strange at all, it's just that "escogió" and "eligió", respectively, would be a little bit more common.