We'll be driving from Galway to Dublin in July. Are Athlone Castle and Charleville Castle worth the detours? If so, how much time should we allow for each? Ideally, we'd like to return the rental car, get to our Dublin hotel, and get to the National Archaeological Museum by 4pm (because it closes at 5pm), but I'm not sure how realistic that is. Thanks in advance.
Athlone Castle is small, but has an interesting history due to its strategic location on the river. It would be a short visit so it will depend on how much you like castles (maybe an hour). I can't answer about Charleville, but Clonmacnoise (monestary site) is also on the way and is well worth the visit (I stayed about an hour and a half).
If you had the time, Trim castle isn’t too far off the motorway headed to Dublin.
What kind of castle interests you? I may be oversimplifying it but I can think of essentially three kinds of castles in Ireland.
The most common are what I'd call tower houses. They are big houses (not necessarily mansions) attached to a tower or keep. These are mostly built by English landlords to live in and defend when the Irish natives got restless. These are all over the place. I don't find these very interesting because they aren't particularly old. Charleville is probably one of the better examples of this type - built in the early 1800's.
The second are the giant manor estates. They are called castles but they're really more like palaces, generally for foreign landlords. They aren't particularly old, by European standards, either.
Finally there are the Norman Castles. Built when the Normans wanted to own Ireland. Trim, Limerick, and Belfast have examples. Trim is a lightly restored ruin. Athlone is mostly Norman but I expect it's been modified numerous times. These go back to roughly the 1200's. Some are more ruin and some are more restored.
There's one other category, the ring fort. There are quite a few good examples in the west (several on Ring of Kerry, a couple on Aran Islands, one not far from Derry). These date back to Roman times (roughly 2,000 years old) more or less. They're sometimes referred to as fairy forts. You can take a day trip from Galway to see Dun Aengus. They're in pretty good shape because they're mostly dry stacked stone (nothing to fall apart) and it's bad luck to take a stone from one.