No, they cannot.
The shop owner is discriminating against persons based purely upon the age of said persons, which has been illegal in England and Wales since October 2005.
Whatever the shop keeper's motives, or prejudice, he/she cannot treat anyone less favourably on the basis of age.
One course of action open to anyone on the receiving end of such discrimination, is to complain to their local Trading Standards Office.
Although I can fully understand the problems faced by small shop owners, this policy (which seems widespread) is illegal.
To my knowledge, it has never been prosecuted, or tested in law.
Shop owners DO NOT have the right to make their own rules, and to refuse whomever they wish to refuse access to their shop. They CAN refuse access individually, to known shoplifters, for example. But such an arbitrary exclusion, based upon age alone, is illegal.