Okay, I've had three children in three different primary schools (not all at the same time) in varyingly rough parts of inner London. All are doing/have done pretty well -- dd1 got into one of the London grammar schools and got a couple of scholarship offers from private schools too, fwiw.
So here's my take:
(1) The school needs to be okay. It doesn't need to be amazingly fantastic, but it must be not terrible. There are levels of crapness in (some) schools which no amount of parental support can compensate for. The place needs to be orderly enough that the children feel safe and happy, and that most of the teaching is at least reasonable.
(2) The child needs to have a chance of finding a reasonable number of like-minded friends. This is not about accent or hairstyle, council flat vs. owner-occupied, but about attitude. If your child is bright, eager and keen, there need to be at least a small handful of other kids who will understand where yours is coming from. The same applies to language/culture, I think -- being the only English-speaking child in a class must be a pretty tough call.
I think those are the only things you can really assess from the outside. The other things that will affect your child's experience are the ones you can't really predict until it's too late the dynamics of the particular class that your child is in, and the fit between your child, the class and the teacher. That needs careful watching a child can be really miserable in a class of fundamentally nice kids if the dynamics are wrong; conversely a child can have an essentialy positive experience in a class where only a third of the children go into Y3 reading at an age-appropriate level (that was dd1's class!).
You can ask some awkward questions of the head and the teachers at the looking round a school stage, which might give you some indications of how they will deal with problems that might arise, but you can't really plan for every eventuality. Enthusiastic teachers who love kids, can keep a class enthralled, and who can listen to parents are a major plus, wherever you find them.
If there is a large number of kids who are working at a very low level, or a massive spread of abilities (dd1's Y3 class had quite a large no. of kids who were reading below Reception level, and a couple at the other end who were reading Lord of the Rings and having opinions on The Iliad) then you will need to keep a reasonably close eye on what your child is doing to make sure that there are no glaringly obvious gaps (your child fails to learn his/her tables, for example, or never masters joined-up writing), but also to make sure they are challenged with interesting stuff to go beyond the fairly dull offerings they are likely to encounter in every day classroom life. This is fairly easy and fun to do -- there are loads of fab activities to do with kids outside school, and there are loads of workbooks on sale that you can use to keep their maths or writing vaguely on track.
The main thing to really watch out for is unhappiness -- if a child is persistently miserable then you need to take that seriously, which may involve making a fuss, or even moving schools. But that is no more likely to happen in a rough school than in a precious or academically pushy 'good' school. Persistent bad behaviour (your own child's!) is also a red flag.
I think people can get far, far too hung up on academic content at primary level -- for infants, you could teach them all the academic stuff in a couple of afternoons a week, for juniors you'd need to branch out a bit, but it's not brain surgery. If you like the atmosphere, like the way the staff interact with the kids, the way the kids interact with each other, and the whole 'feel' and 'mission' of the place, that's probably as good an indication as any you'll get. And much more reliable than Ofsted reports.