In 40s - 2 Queens - cost 300 - produce 2x4 larvae - which are permanent (up to 4 injections)
In 40s - 1 Hatch - cost 300(+50) - produce 2x3 larvae - only if you use them every 20s
So the hatch optimally requires more micro than queens (and perfect unit planning too), still gets you fewer larvae, and costs a little more. But counting the drone, queens cost you 7 more food = 2x2 queens + 2x1 hatch + 1x1 drone. Which is essentially an overlord - 100 minerals, or 100.7/8 = 87.5. Thus, in minerals per larva per time, queens vs hatcheries have a ratio of 48:58 in favor of the queens. So, queens are roughly about 20% more larva efficient, and only in specially optimized strats you could opt to rely on more hatcheries instead.