What's the criteria for when a scrobble is linked to Musicbrainz?

Listens in ListenBrainz are only linked to MusicBrainz if there are recording MBIDs in the tags of the listened files and if the software you use to play and send listens with reads those tags.

See also this thread and this one.