Let's start here:
"Anurognathus had a short head with pin-like teeth for catching insects and although it traditionally is ascribed to the long-tailed pterosaur group "Rhamphorhynchoidea", its tail was comparatively short, allowing it more maneuverability for hunting. According to Döderlein the reduced tail of Anurognathus was similar to the pygostyle of modern birds. Its more typical "rhamphorhynchoid" characters include its elongated fifth toe and short metacarpals and neck.".
So we see that even some of the primitive pterosaurs were already developing shorter tails, "similar to the pygostyle of modern birds".
Of course we know that the more advanced pterosaurs, the pterodactyls, were even more bird-like:
"Pterodactyloidea (meaning "winged finger", "wing-finger" or "finger-wing") forms one of the two suborders of pterosaurs ("wing lizards"), and contains the most derived members of this group of flying reptiles. They appeared during the middle Jurassic Period, and differ from the basal rhamphorhynchoidea by their short tails and long wing metacarpals (hand bones). The most advanced forms also lack teeth.
Among other features that diagnose the Perodactyloidea is the short tail with less than 15 caudal vertebrae. Although this number could be higher (complete tails are know for only a few specimens), this condition differs from all non-pterodactyloid that have a long tail. The sole exception is found in the anurognathid Anurognathus (and perhaps other members of the Anurognathidae) and, according to the present analysis, a short tail was achieved independently by those taxa.http://pterodata.blogspot.ca/
The group Pyostylia was intended to encompass all avialans with a short, stubby tail
Here is some info on the tails of some of the primitive flying birds:
"Shanweiniao is an extinct genus of long-beaked enantiornithine bird from Early Cretaceous China.
"The genus name Shanweiniao means "fan-tailed bird" in Chinese. The authors report that Shanweiniao is [so far] the only known enantiornithine bird with a tail surface capable of generating lift, as in modern birds.They also report that only one other Mesozoic bird, Yixianornis grabaui, which is a basal ornithurine, has been reported with this fan - shaped tail feather morphology.".
Here is some info on the tails of some of the secondarily flightless primitive birds:
"Oviraptorosaurs, like dromaeosaurs, are so bird-like that several scientists consider them to be true birds, more advanced than Archaeopteryx. Gregory S. Paul has written extensively on this possibility, and Teresa Maryańska and colleagues published a technical paper detailing this idea in 2002. Michael Benton, in his widely-respected text Vertebrate Paleontology, also included oviraptorosaurs as an order within the class Aves.
Their tails are very short compared to other maniraptorans. In Nomingia and Similicaudipteryx, the tail ends in four fused vertebrae which Osmólska, He, and others have referred to as a "pygostyle", but which Witmer found was anatomically different and evolved separately from the pygostyle of birds (a bone which serves as the attachment point for a fan of tail feathers).
Similarly, quill knobs (anchor points for wing feathers on the ulna) have been reported in the oviraptorosaurian species Avimimus portentosus."
The tails of theropods (bipedal carnivorous dinosaurs) underwent dramatic anatomical changes along the line of descent to modern birds , , , , . Ancestrally,Carnotaurus and more basal forms had long, massive tails that were more similar to the tail of a crocodile than to the tail of a bird . Theropod tails generally have two regions. Before the ‘transition point’ the caudal vertebrae have neural spines that are dorsoventrally tall and chevrons that are dorsoventrally deep, as well as wide spans between the tips of each vertebra’s transverse processes. After the transition point these features are greatly reduced or become absent. This transition is not actually a ‘point’ per se because the changes in the tail features are variable, unsynchronised and occur over several caudal vertebrae , . In contrast, extant birds have short, light tails with caudal vertebrae that do not cross a transition point, but the tip of their tails are co-ossified (pygostyle) and support a tail fan , , .