Hsuan Tsung's son, the T'ang Emperor Suzong, asked a neighboring power, the Uighur Empire, to help him crush An Lu-shan's rebellion, and by 757 AD, thanks to the Uighur army, Suzong was able to get An Lu-shan assassinated. Still there was more civil war until 763 AD. These wars wrecked China and killed millions of people. Suzong never did really get command of China again. The generals of the armies in each province had more real power than the emperor did. There were also several revolts of the poor farmers in the countryside.
By 800 AD, however, the T'ang emperors had gotten back a lot of power. When the Uighur Empire collapsed, in 840 AD, and Uighur refugees came streaming into China, the T'ang Emperor Wuzong was able to order a great persecution to wipe out the refugees, on the grounds that they were Manichaeans, followers of a foreign religion. Soon Emperor Wuzong's persecution spread to include not only other minority religions like Christianity and Judaism, but also the more popular religion of Buddhism. The expansion to Buddhism may be due to Tibetan Buddhist refugees fleeing an anti-Buddhist persecution there, but it was also convenient to get money for the T'ang government by plundering rich Buddhist monasteries. Thousands of people were killed, and after Wuzong's death Buddhism came back anyway.
Eyewitness: Ancient China, by Arthur Cotterell, Alan Hills, and Geoff Brightling (2000).
Daily Life in Traditional China: The Tang Dynasty, by Charles Benn (2001). A general introduction for adults.
Women of the Tang Dynasty, by May Holdsworth (1999). A short introduction, with many pictures of T'ang period figurines.
The Court of the Lion: A Novel of the T'ang Dynasty, by Eleanor Cooney and Daniel Altieri (1990). Historical fiction, for grownups.