I do not know of one book that covers everything?
In addition to the one's already mentioned, one I liked for just a general all around wiring guide was Wiring Your Toy Train Layout by Peter Riddle. It's mostly conventional oriented as I recall, but gives you the basics and I thought it was well written and easy to read. If you are conventional only, this is a good book to have.
For command control, for DCS it's the DCS O Gauge Companion (Barry's book). New version just released, get that one if you are going for DCS.
I don't know of one for Legacy? The Lionel website has some instructional videos and other information and their Track and Power catalog from a year or so ago has some information in it.