Yes, it is possible to take a day trip to another city from Istanbul during an 8 hour layover, although it may be difficult to fit in much sightseeing.