AVI and MP4 are both appropriate for YouTube, however MP4 is the format that produces more high-quality video.
The compression techniques used by MP4 do not result in as much of a loss of visual and sound quality as compared to AVI. Furthermore, YouTube themselves recommend uploading in MP4 format whenever possible. That being said, the website also supports AVI.