There are two hotels on the airport grounds and several more in nearby suburbs, but there's no reason not to spend that night right in the middle of Dublin, as long as you leave enough time to make your evening flight (I suggest three hours). Aircoach bus (aka coach) #700 takes about half an hour from DUB to the city. I stayed at Buswell's Hotel, across the street from one of the bus stops and a short walk from places like St. Stephen's Green and Trinity College, but there are many choices.
You might want to download Rick Steves' two suggested (linked) Dublin walks and take one or both, or you might want to make your own sightseeing plan using a guidebook. Many worthwhile sights are within a mile or so of each other. Some, like Kilmainham Gaol or the Guiness Storehouse, will take longer to reach and might be better skipped on your tight timeframe. But you'll have an afternoon and most of the following day, and the weather should be cooperative.
You'll go through passport control and customs on arrival, and through airport security before departure. It isn't clear whether your backpack will be checked, and I don't know whether it can stay with the airline overnight (I'd guess not, but check with the airline). If that's possible, then pack some overnight things in your carry-on to save time and simplify.
You won't have time to fully appreciate Dublin but you'll have enough time for a good taste. I'm neither female or petite but I doubt if you'll have personal safety issues there. Temple Bar is a rowdy scene that I walked through one afternoon and didn't want to revisit in the evening. There are evening pub crawls (see guidebooks) that can show you this side of life easily and safely if you're interested, though after an overnight flight you might want to retire early.