Depends on the betta. Some bettas will kill everything, including snails. Others will accept most other fish.
Generally, you don't want anything that will nibble the betta's tail (like tiger barbs, angelfish, etc.) or anything that the betta will attack. They usually don't like male guppies (they think the long flowing tail is another betta), other bettas (male or female), male gouramis (related to bettas), or neons/cardinals (again, they get fed up with the colors). Some also have a tendency to eat out tetra eyes. Of course, some people have made some of these combinations work, if they happen to get a really passive betta.
Good tankmates are passive fish or bottomdwellers. Bettas tend to stick to the upper areas, so they don't usually mind things like cories, kuhli loaches, dwarf frogs, shrimp, snails, and otos. I think white cloud mountain minnows tend to work with them. Tetras, depending on the betta, will work. In a large enough school, danios should leave bettas alone.
Edit: This was for males. Usually females will do well in a community setting, but they will fight with other females. I think females get along with most other fish.