Generally organizations take a top-down view of team formation with managers laying out the design of teams. See What Should We Consider When Forming a New Team? for this approach.
An alternative approach is really embrace the idea that the people who do the work should make the decisions and to have the people figure it out for themselves. This is a summary of some of these ideas: