The MeshValueCollection is a sparse representation of mesh entities with tags. It is usually used to load in sets of tagged entities from external software.
The MeshFunction is a function that contains a marker for each entity in the grid. This function is used for assembling of sets of cells/facets, create boundary conditions etc.
One usually use the MeshValueCollection as input to a MeshFunction.