That is a bit like asking "which city is best to visit... Paris or Rome?". There is something for everyone in both cities, and both Pleasanton and Danville are extremely kid friendly, family friendly communities. They have comparable, and top flight, schools, lots of parks, charming downtowns, excellent recreation and youth sports programs, and both communities are safe, and enjoy a high degree of parent participation in their schools.
Most of the time, the decision between the two communities comes down to other factors such as
* Commute accessibility: If you are commuting to the South Bay or Peninsula, Pleasanton is more accessible in general. If you are commuting to Walnut Creek or Oakland, Danville is closer. If you are taking BART to S.F., Pleasanton is more accessible. If you are driving to SF, it is probably a toss up.
* Lot Size: Depending on your price range, the typical tract home in Danville tends to have larger lots that what you find in Pleasanton. This is especially pronounced in the older more modest neighborhoods.
* New Housing: Danville has more new development than Pleasanton. Pleasanton is essentially built out at this point, and Danville still has new construction in the Tassajara Valley, including Alamo Creek, which will be online for at least the next couple of years.
For comparison, feel free to check out these two web pages
Best of luck to you, and let me know if you have any questions