It depends on the kind of firm you're looking at. Most of the larger city firms recruit 2 years in advance meaning you can apply from you penultimate year if you're a law student, final year of you're non-law. A lot of these deadlines have now passed, but it's worth checking on sites like law careers to see which firms applications are still open or might have been extended.
For some smaller firms, the deadlines can differ massively. For example, Leigh Day's application for a 2017 TC didn't close until March of this year. Keep an eye on sites like law careers and all about law, as well as the websites of the firms you are interested in. It can be useful to follow these accounts on twitter because they regularly post about deadlines etc.