When is good to buy Crest of Artorias key and open the locked door in Darkroot Garden? Is it worth to collect 20000 souls as soon as possible and open that door?
It depends on whether or not you farm the forest NPC's.
If yes, then it's worth unlocking as soon as possible. I usually level up until 10 or 15, then I save the souls I get from the bell gargoyles and get summoned once and I'll have the 20k I need. After that I could farm the NPC forest hunters for about 7k a minute.
If no, then I don't bother buying the crest until after I get back from Anor Londo, and by then 20k is nothing big.
It depends on how skilled you are at spending souls. 20k is nothing later in the game, but if you're good at soul management 20k means little early on as well as it's easily retrievable.
I usually grab it as soon as possible, typically after I beat the taurus demon.
What I do is run across Drake Bridge and down to Burge Bonfire via the Ladder. Once there I climb back up to the Drake Bride, aggro the Drake by stepping onto the bridge, he breaths fire which I dodge by going back down the stairs, and he nukes the enemies on the bridge (555 souls per run)
It take a few minutes, but once I get my souls I run to Andre and buy the crest to unlock better farming opportunities. Of course, that's just me.
What I typically do is use the souls I get from beating the Stray Demon on it. There's minimal travel time between the boss fight and Andre, and only a couple of rather weak enemies as you leave the Asylum meaning you have very low risk of losing the souls.