Sounds like a simple question, but it's not. First, let me make it clear that I'm not an expert on the subject and am struggling to understand the basics, so don't take anything I say as gospel.
First, I think you need to keep the distinction between a container format and a compress scheme separate. The term "file format" kind of glosses over the distinction, but it's important. The container format is the file format but it contains video and audio streams that are compressed in various ways using different codecs. Some file formats include MOV, WMV, AVI, MP4, RM, MPEG, VOB, and DIVX.
Then there are the video compression codecs. These include MPEG-1, MPEG-2, MPEG-4, and others. There are lots of variants of these, like DIVX and XVID, which are both flavors of MPEG-4. There is also H.264, which is an implementation of MPEG-4 Part 10.
Which is the best depends on the application. MPEG-4 generally provides better video quality at a lower bit rate than MPEG-2. On the other hand, MPEG-2 decoders are more universal, so you have fewer compatibility issues with MPEG-2. If I was looking for something that I wanted to distribute for non-techy people to watch on their TVs, I'd make a DVD (which uses VOB container files containing MPEG-2 encoded video). If I wanted to make the most universally available computer file possible, I'd use MPEG-1 (although the quality would pretty much suck). If I was willing to restrict my audience to people with reasonably current decoders, I'd probably pick H.264.
For personal use, I have most of my store bought movies encoded as MPEG-2 becaues that's the way they came and I don't like re-encoding (space is cheap). For the car, I do re-encode and I use DIVX (because that's what my mobile player likes). For videos that I make, I use HDV (because that's what the camcorder uses) and I output to MPEG-2 (when sharing things on DVD) or H.264 for personal use at the house (because it gives me the best video quality with the least space used).