BBC4 have recently been running a series of railway-related programmes (some of which have aired on other BBC channels). They've shown that people have been complaining about rail fares for the past 60 years, so it's nothing new!
There's no fixed rule as to how far ahead you have to book to get the best fares. If you're travelling at some very quiet times (e.g around 1030 on a Tuesday, which is usually a good bet for a bargain) you can often get really low fares only a day before travel. However, if you're hoping to travel at a fairly busy time (e.g. around breakfast time on a Saturday), it's usually best to book at least one month in advance.
Train operating companies are required to release their ticket allocations into the booking system 12 weeks prior to the date of travel. Some operators might release their ticket allocations prior to this time but the 12 week point is when you'll normally find all of the bargains available. Some will sell out within days but others, as I've indicated above, might still be available for sale on the day before departure. It should be remembered, however, that you'll never get the real bargain fares (or possibly any bargain fares at all) on peak time commuter services. (Commuters who pay thousands of pounds of year for travel on trains which are already overcrowded would rightly complain if other passengers were encouraged to make the overcrowding worse by the provision of cheap fares).
Chris