The Abbey and Peacock are in the same building. As for when to buy tickets, I suppose it depends on what show you want to see and how popular it is. You could send an email inquiry to ask them how the bookings are going for their shows: http://www.abbeytheatre.ie/ They will be able to advise you on when you should book for the particular show you are interested in.