avi is a container, it holds audio and video streams. codecs are what are used to encode (and play back) those audio or video streams. So that's not a very good question ...

I suggest what a lot of other people suggest ... if you're playing normal stuff, install the latest xvid (which will decode xvid and divx5), install the latest ffdshow for divx 3/4, install ac3filter if you're watching stuff with ac3 audio streams, and only install other stuff (like ogm splitters and stream switchers and subtitle filters) if you need them.

As far as an overall "best" codec, the 4 major stream codecs (xvid, divx5, wmv9, real) all have their own strengths and weaknesses. Because they do things differently, there's no clear "best", if that's what you're asking. But Xvid is probably the most versatile single codec for playback as well as the best quality for decoding xvid stuff, and ffdshow is the most versatile overall (being able to decode just about everything you throw at it).