If you look at the stickies at the top of the UK page you will see the following from Joppa:
If you are here on family route (as spouse or unmarried partner), and you entered UK on 33-month visa, then the earliest you can apply to renew your leave on form FLR(M) is on the 30-month anniversary of your UK entry (not from 'valid from' date on your visa, unless you arrived here on the first day of validity), minus 28 days. So for example, if you arrived in UK on your settlement visa on 17th June 2015, you can apply on 17th December 2017 (30-month anniversary), minus 28 days which will be 19th November 2017. So that's the first day you can book your premium service centre appointment for (for same-day service) or send off your application by post.
If you switched your leave within UK from fiancé(e) visa or any other non-visit visa (such as Tier 4 student, Tier 5 YMS or Tier 2 General) to leave to remain as spouse/partner on form FLR(M), your leave will be for exactly 30 months so you can renew up to 28 days before its expiry. This is also the case for ILR (settlement) application after being in UK for 5 years.
If you wish to renew or extend a non-settlement visa such as Tier 4 or Tier 2, there is no stipulation about how many days in advance you can apply, but your next leave will be valid from the date of issue, even if you had some days left on your previous visa or leave. Something to bear in mind if you can qualify for ILR after a stipulated period of residence, such as Tier 2 General. They usually allow up to 3 months short of prescribed period but naturally you don't want to cut it too finely.
If you renew your visa before the expiry date, the unexpired days of your previous visa are usually added to the new leave. Just bear in mind when you come to apply for settlement (indefinite leave to remain), as you will be able to apply some time before the expiry of your visa, i.e. 30 months on your visa, minus up to 28 days. Don't work it from the expiry date.