If you don't have any mods to enable, download one from Steam Workshop, or simply create an empty folder in your mods directory. The debug console is only accessible if one or more mods are enabled.
Or, if you are a mod developer, you can use it to quickly test various things in your mods. It is an extremely useful way to verify a particular game mechanic, explore a seed, test launch options, or test various things about the game.
The debug console is accessible in The Binding of Isaac: Afterbirth † and The Binding of Isaac: Repentance.