I believe it is called a section 8 contact order (the childrens rights act). Anyone can apply for one - grandparents, siblings, stepparents, or anyone who has a significant part in the childs life and wants to continue to be a part of that childs life. As ever, the courts will rule according to the individual circumstances of each case and whether or not it is in the childs best interests.