In the beginning stages of the game, coal gets used up pretty fast for energy. But as you progress, it stays important for creating things like ceramic and steel. Coal farming is actually Hatch farming, the tiny little critters found on most maps (and sometimes as a printing pod reward).
Farm and Breeder Farm
Many farms follow a typical layout, a few critter feeders full of an almost inexhaustible supply of igneous rock (or similar), a grooming station to boost egg production and critter drop off.
Usually you will start with basic hatches (the ones with dots on their back). To produce coal we will need stone hatches, by feeding regular hatches raw minerals such as igneous rock they will breed into stone hatches.
The farm setup will have two kinds of critter stables, regular farms (top two) and breeder farms (bottom three). You can vary the ratio of regular farms to breeder farms to suite your needs. More breeders at the beginning will help with get started faster.
A breeder farm with incubator will supply regular farms, set the breeder farm critter drop-off to auto-wrangle surplus at 6, this will prevent overcrowding and speed up egg laying. The regular farms are there to catch surplus population, set to max critters (20) with no auto-wrangle surplus.
Coal and Meat
A stone hatch will eat 140 kg (308lb) of raw mineral per day/night cycle, half of that will be excreted as coal, that is 70kg (154lb) of coal per hatch daily. A coal generator will hold 600kg (1322lb) of coal and use that per day/night cycle.
That means about 9 stone hatches are required per coal generator (if the generator is run without stopping). During game play usually you won’t need that many per coal generator, but it really depends on base layout and needs.
The regular farms make is easy to convert the extra population into meat from time to time. Use the attack tool, selected a regular farm or two and dupes will clear the farm. The breeder farms will top up over time with extra population.