Vixo has hit the nail on the head for me. Leggings under dresses are practical. They mean you can chase after toddlers, crawl under tables, go up climbing frames, etc. Therefore you could wear a nice dress to places you wouldn't usually.
However, IMO, dresses and leggings scream just that - "mumsy." They don't look stylish, they look comfortable. IMO, black leggings kill the look of a nice dress. Even worse when teamed with black ballet pumps or - worse still - sparkly pumps. I'm saying this because this is S&B. People can of course wear whatever they like but if they're posting on S&B I can presume they want genuine opinions on style.
Which is where this thread has got confused - half of us are saying they don't look stylish and make legs look thicker, while the other half are saying "yes, but they're comfortable." Which is also right.
I wore dresses with leggings when I was pregnant. Haven't and wouldn't since. It can work in a Fat face/ white stuff/ Joules sort of way, but as I would never wear stuff from there, leggings and dresses aren't for me.
IMO a nice summery dress works with bare legs and sandals/flats (not good with high heels). Perfect for the office, shopping, a walk, day out, whatever. If I'm going to soft play I wouldn't team the dress with leggings, as my short and muscular legs swathed in black would kill the look. I'd wear skinnies or straight-leg jeans instead.
Sorry that was long, and far too much effort to go to for a debate on leggings!