iMovie will at least work great with DV. There are differences between formats. Different codecs have different purposes. H.264 is mostly for broadcasting. mpeg-2 mostly for DVD's. These codecs need to be contained in a "container" (or something like that). .mov .wmv .avi .flv are all containers. So the codec (actually codec) can be the same in different containers. For example a short movie can have the mpeg-2 codec but can be in a .mov container or .wmv container.
as you can understand, quicktime (iMovie works together with quicktime, so if quicktime won't read it okay, iMovie neither will) likes the .mov format. And more importly is the codec.
For your computer to quickly make changes it's easier that the video files are as uncompressed as possible, cause else it will spend time decompressing. For example AVCHD is very compressed, and takes more time to render. But DV or AIC (apple intermediate code) are way less compressed and will therefore be faster to handle for your pc. And that's why these codecs are mostly the editing codecs.
Conclusion: try to make it DV.
Second thing you actually should try before doing what's stated above is installing perian if you haven't already done that. check perian.org
This is a piece of software which makes quicktime read almost all codecs. So this way iMovie will (probably) proper import your .avi file.