There are often a lot of traffic jams around Dublin and the airport, so have more Euros handy than you may think you need in case your taxi bill turns out to be higher because of traffic.
Air Coach is a bus service that can get you to the city for about 7 Euro flat. They do not drop you off at your hotel, so if you have a lot of luggage or a heavy bag that you can't carry a few blocks, then take the taxi.
If you travel fairly light, the absolute cheapest way to get to/from the airport is the No. 16A city bus. But it does take much longer because you are making lots of stops along the way.