Various train operators publish their own rules. Traditionally the timetabled time would be the "wheel start" time, meaning the time when the wheels actually started moving. This dates back from when train doors were manually operated, so measuring the door close time wouldn't make much sense. This meaning is carried forward to modern trains, so to allow for an on-time departure, train doors are locked anywhere between 30 seconds and a minute prior to departure. This should be advertised by each individual operator somewhere (maybe in the timetables, maybe on their website, or maybe just at stations). See for example this Tweet from South Western Railway (sadly I couldn't find a more official source on their website). Once the doors are closed the train may leave whenever the people involved with dispatch are satisfied that it is safe to do so - so in practice a train could end up leaving up to about 45 seconds early in an extreme case.
At large termini they might also stop advertising trains, or stop letting people through the gates, up to a few minutes before their departure, to discourage people from running long distances across the concourse to their trains.
Besides this, you might also be interested to know about minimum connection times. These are the official minimum times you must leave for a connection to officially be valid (and so eligible for compensation and/or the use of the next available train if the connection is missed). This is by default 5 minutes but can vary considerably depending on station. This information can officially be found in timetables, but a good unofficial source for it using the same data as journey planners is BRTimes. It's a little more complicated, but still possible, to use this site to calculate things like minimum connections for trips across cities (eg London) between different railway stations.
Technically speaking each regularly scheduled passenger train actually has two timetables - the public timetable (or GBTT for Great British Timetable), and the working timetable (or WTT). They are mostly the same or similar, but can differ slightly for various reasons I won't go into (the WTT is also accurate to the half minute as opposed to the minute for the GBTT). But when it comes to what times trains are "allowed" to leave, as well as calculating the delay, the GBTT is the only one that is relevant.
Speaking of calculating delay, again, the rules about claiming compensation for delay vary between operators (basically depending on when the franchise was specified, as the rules have over time got more favourable to passengers), but if your full rail journey is delayed by 15 minutes or more, you should check the operator that caused your first significant delay's website, to see what their rules on delay compensation are. Some operators will compensate for 15 minute delays; some for half hour delays; and some only for hour long delays. Some will compensate for any reason, and some reasons only within the rail industry's control. But in any case, delay compensation applies to full (rail) journeys, not individual trains — so if a small delay causes you to miss a train and means you're delayed by, say, half an hour overall, but no individual train is delayed by more than, say, 10 minutes, you can still claim for a half hour's delay because that's how much you were late by. But on the flipside of the coin, if your first train is half an hour late but you still make your connection so you arrive on time, you can't claim for that delay. The "reference" journey to use for comparison is the one complying with all minimum connection times — as mentioned above. If your intended journey didn't comply with minimum connections then you've no right to claim delay compensation against that journey. All operators must comply with a minimum delay compensation scheme which is detailed in the National Rail Conditions of Travel, but most schemes (especially in later franchises) are more generous than this.
One final thing that timetables regulate is the provision of first class service. Although this is not really written anywhere any more, it is still a de facto rule that if a train is listed in the official timetable as not having provision for first class, but a train with a physical first class section happens to turn up, then that first class section may be treated as standard class. I have never heard of anyone being successfully prosecuted by sitting in a first class section on a train without first class in the timetable, and I've done it myself many times.