I know this is an old post, but if you're here from a "Annex B vs AVCC" search, I thought it would be worth adding another opinion, because what I believe to be the most important reason to use Annex B has not been mentioned.
@VC. One has already provided some technical information about each of the formats, so I will try not to repeat that.
I wonder in which case we should use Annex-B
To answer you question directly, the Annex-B start codes allow a decoder to synchronise to a stream that is already being transmitted, like a UDP broadcast or wireless terrestrial tv broadcast. The start codes also allow the decoder to re-synchronise after a corruption in the media transport.
AVCC does not have a recovery mechanism, so cannot be used for purposes like I describe above.
To be clear, each of the formats have practical advantages and disadvantages.
Neither is "better" - they have different goals.
The comparison of these formats is similar to MPEG-TS vs MPEG-PS.
Transport stream (-TS) can be recovered if the stream is corrupted by an unreliable transport.
Program stream (-PS) is more compact and easier to parse, but has no recovery mechanism, so only use it with reliable transports.
For those parsing NALU's out of a byte stream that is stored on disk, you might reasonably question why you are searching for start codes in a file on disk, when you could be using a format that tells you the atom sizes before you parse them. Disk storage is reliable. So is TCP transmission. Favour AVCC in these contexts, if it is convenient to do so.
However, keep in mind that constructing the box structures in AVCC is more complex than just dropping start codes between each NALU, so recording from a live source is much simpler with Annex B. Apart from the additional complexity, recording directly to AVCC is also more prone to corruption if it is interrupted, because that format requires that the location of each of the frame boxes is in an index (in moov boxes) that you can only write retrospectively when you're streaming live video to disk. If your recording process is interrupted (crash, power loss, et, al.), you will need some repair process to fix the broken recording (parsing the box structures for frames and building the moov atom). An interrupted Annex B recording, however, will only suffer a single broken frame in the same scenario.
So my message is "horses for courses".
Chose the one that suits your acquisition/recording/reconstruction needs best.