Immigration lines depend on the time of day your arrive, but in my experience have never been more than 20-30 minutes, sometimes less. I've never once been stopped by customs (12 visits in the last two years).
If you assume that immigration/customs both ways will take you an hour, it's an hour each way into the city and back and you have to be back in time for boarding, it does not leave you a lot of time for visiting.
If you want to give it a shot, maybe take a trip to the Taipei 101, up to the observation deck, and back to the airport.
Me, i'd just hang in the lounge.