You want:
https://www.forgeworld.co.uk/en-US/The-Horus-heresy-legiones-Astartes-Age-of-Darkness-Army-List
[url]
This one contains all the non-specific Legion Rules. This is the #1 book you need if you want to play 30K. [/url]
https://www.forgeworld.co.uk/en-US/The-Horus-Heresy-Legiones-Astartes-Age-of-Darkness-Legions
This book has all the Legion Specific Rules. As in, if you want to play Ultramarines, you'll need the first book for the generic units and rules, and this book for the Ultramarines rules.
https://www.forgeworld.co.uk/en-US/The-Horus-Heresy-Mechanicum-Taghmata-Army-List
This book has all the rules for playing Mechanicum and Titans in 30K.
The Red Books basically have all the updated rules up to Book Five/Book Six, but not all the rules from Book Six. They have been updated TWICE since initially released, and in true Forge World fashion, there is no way to tell if you have the latest Red Book or not. I was burned by purchasing a "Red Book" last year that turned out to be the first edition and had outdated rules. I do not recommend buying second hand/eBay as it's almost impossible to figure out which Red Book you are getting.
As far as the black books are concerned, they are fluff books with a lot of outdated rules.
Book Four (Conquest) details some Mechanicum and Imperial Knights/Titans. These rules are all in the Red Book Mechanicum.
Book Five (Tempest) details the Ultramarines and Word Bearers. These rules are in the Red Books above.
Book Six (Retribution) actually has rules not yet included in the above Red Books. This book details the Shattered Legions and Black Shields, and has "fake" rules for the Legions not yet detailed: Blood Angels, Dark Angels, and White Scars. I call them fake rules because there are no characters or Primarchs, just Legion specific rules and Rites of War for them.
Book Seven (Inferno) has the Space Wolves, Thousand Sons, and Talons of the Emperor (Custodies/Sister of Silence). These rules are NOT in the Red Books. This is the newest Black Book that has been released.
Book Eight, no title yet, will have full rules for Blood Angels, Dark Angels, and Daemons, but has no release date yet.