It depends on what you are after, but generally summer is the best time to visit these countries, August is the prime time.
There is a lot on during summer in the UK and Ireland so you would not be short of things to do. Edinburgh has the Edinburgh Festival during August, which is a month of comedy, theatre, arts, etc, spread across pretty much every venue, pub, restaurant, and street in the city. Its awesome.
In and around London in August there are many festivals and markets to visit. The music festivals in Summer in the UK are huge and amazing and feature the worlds top artists. If you are heading over during this time I would recommend looking up on popular UK websites like ticketmaster or ticketek to see what big events you can check out while there. Tickets for things like concerts in Hyde park do sell out pretty quick.
Ireland again you probably want to try to go in summer. All of these countries struggle to ever get really hot, and they all rain a lot so summer is best to limit the bad weather. Ireland is beautiful to hire a car and drive around, visiting the more remote but spectacular areas like the Dingle peninsula and the coast west of Cork.