Minecraft wiki entry for Superflat, associated text: The biome ID must be correct. For example, at present villages can appear only in biome IDs plains, desert, taiga, savanna, snowy_taiga, and snowy_tundra.
The correct structure code ('village', 'dungeon' etc.) must be present in the superflat string.
Structures must be turned on in world settings. (This does not affect 'natural' objects such as trees, flowers, mushrooms, and giant mushrooms. Obsidian pillars in the End also count as 'natural'.)
There must be suitable terrain for the structure to appear on or in. This applies to most features except for mineshafts and strongholds.
Villages are a partial exception; they do not form in mid-air, but can form provided there is at least one solid block layer.
Villages always spawn at least 2 blocks above the void.