I have both.
If I will be needing to dig things out of the bag all day, I like the messenger bag because I can leave it supported by my shoulder as I rummage through it. My backpack must be removed and balanced on my knee or the set on the ground or other surface.
My backpack is more comfortable and stays put on my back without shifting around. No need for readjusting continuously as it slides around, although some folks may have more skill at wearing a messenger bag than I. So if I am just carrying lunch and a change of clothes to work, I will almost always wear a backpack.