Merge visible is to merge the layers that are visible. There may be layers that are not shown (non-visible). These non-visible layers will not be merged.
To flatten the image, is to merge all the layers visible,non-visible and the background layer into one single layer.
if i not wrong, if u click the eye icon next to the layer in the Layers palette, you are making it non-visible. those layers might be intermediate layers in a process that you dun want them to be merged in the final flattened output.