You can rejoin the LGPS at any time as long as you work for an employer who offers the pension scheme.
What happens to previous pension benefits when you rejoin depends on when you originally left:
In both cases you have 12 months from rejoining to decide whether to keep your pension records separate or join them together.