Yes, but it wasn't the final factor. It was more important for us at secondary, and that is mainly because ds is very academically able, so we were looking for a school to suit his needs.
Other factors:
primary - ofsted, location, intake (we chose the school with a mixed intake rather than the one with 90% from one estate) facilities, size of school, how well they dealt with different needs in class.
But honestly? It is very very close to our house and when we visited it had a really happy enthusiastic buzz. That is really how they are now we are there.
secondary - mainly results in combination with school ethos and atmosphere. I love the head, he was so positive about the boys in his school, I wanted my son to be under his care. BUT if he ran a school with crap results, he wouldn't have gone.
Honestly - in this school it is cool to be clever, that was our gut reaction. Has been totally confirmed since ds started.
Just to contrast with what is said above, we moved mid year for primary and could have chosen from 6 primaries (within 2 miles) who would have been able to take us.
Secondary, we could have applied for (and others in ds class got into) 8 schools.