Baby Bearded dragons do best alone. They can be kept in small groups if the enclosure is large enough, there is numerous feedings, and close attention to each Dragons welfare.
Adult Dragons can be kept in small breeding groups consisting of one to two females per male per enclosure. Two males can never be kept together, and two females can be bad news if one is very dominant over the other. As a rule, if keeping Dragons as pets, it is best to house them individually.
The size of the enclosure is always relative to the size and number of Dragons in question. One baby Dragon requires at least 12" by 24" of ground space with a basking perch and a cool zone. Adult Dragons should be kept in cages no smaller than 36" by 24" ground space, with some height, at least 20", to allow for basking perches. Glass tanks are suitable, but a custom cage with 3 solid sides is optimal, especially for adult breeders.
Always take into account both the safety and comfort of you're Dragon as well as the ease of use, when designing a cage. Remember that Bearded Dragons require daily attention, and a complicated enclosure will complicate care.