Is there (or has there ever been) a legal requirement to provide a replacement bus service whenever a line or station closes, at least if the area affected isn't already adequately served by buses?
In short, no. There was/is no legal requirement, but in order to close a line or station agreement from the Minister of Transport was required, after the matter had been considered by the relevant Transport Users Consultative Committee (TUCC). Replacement bus services, if required, were covered as part of this consultation, as a mitigation against the hardships that may be caused by such closure. British Railways would have considered the alternative transport available in the districts affected, and the travel flows (and their size). It may well have been that existing Road Transport Services covered most needs, or an amendment to the routeing or timetables (say an extra trip or two) of existing services would suffice. In which case the Railways would negotiate a suitable fixed price for this extra provision. In many cases it was judged that an additional service was required, as the existing bus services did not cover the rail route adequately (possibly because there was insufficient traffic for both rail and road service), or because the displaced rail passengers were too numerous for the existing capacity available, or maybe a combination of both).
Again in this case, the Railways would negotiate with a local bus operator and pay a fixed sum for the provision of the service [unless the bus operator felt inclined to take on the service at its own risk]. These service alterations or introductions would form part of the case for closure, and would come under scrutiny from the TUCC, taking into account public comments both written and at any inquiry that may be held.
It must be noted that many of these railway services carried very little traffic, and it was obvious that any special replacement services would run at a massive loss. Obviously the Railways sought to keep their financial commitment at a minimum, and only the main flows were catered for. Initially the Railways had to pay any subsidy for a period of three years, but I believe they were relieved of this responsibility sometime during the 70s - the Government channelling such funding via the County Councils through their new Transport Co-ordinating role.
The Bus Companies were not always exactly keen for these replacement services to exist - often they ran in competition with parts of their own services - and came at a time of serious staff shortages, and capital for new bus shortages, in the bus industry. Often they resisted diverting existing services via Railhead Stations, or changing times to connect with remaining train services, as the inconvenience to the (majority) local passengers far outweighed any potential numbers of rail passengers. Apart from those replacing busier rail lines for which parallel bus services did not exist, most of the replacement services were assimilated into the surrounding bus networks, or disappeared completely, after the three funded years; which probably tells us something about how many passengers were using the trains!