A queen using the spawn larva ability as often as possible creates 4 larva after 40 seconds (so an average of 1 larva/10 seconds). A hatchery produces 1 larva every 15 seconds, and only if there are less than 3 larva at the hatchery. Thus a queen effectively used actually produces more larva than an extra hatchery, and for less than half the cost! Don't forget that extra hatch also costs the 50 you spent on the drone, and is one less drone mining.
Especially early game or vs any things like a banshee rush or void ray rush, the queen's attack capabilities are not to be underestimated. Don't forget, until lair tech queens are your only mobile anti-air unit you have. Additionally, queens have the transfuse and creep tumor ability.
Spreading creep is vital for zerg as it provides vision as well as a speed increase to all zerg units on it, so creep tumors are a necessity.
Transfuse is nice for keeping your key units or structures alive, but is most commonly used on other queens when they are your only anti-air until you get your lair tech out.
Note: you can only have one larva inject on a hatchery at a time, so 2 queens on one hatch do not increase the larva spawn rate any more than one does.