The answer is 'whenever you like', however whilst the vast majority of babies are born healthy and at term (or very nearly) there are still a lot of reasons why, sadly, some aren't.
Really, I wouldn't advise buying anything until after 12 weeks. People call this the 'safe point' but honestly, there's no such thing. There is no point in pregnancy where things suddenly become 'safe'. After 12 weeks a pregnancy is LESS LIKELY to end in miscarriage (I lost twins at 19 weeks and its possible to lose babies much later than this also) but as many people can attest, sadly it's not always the case.
If you want to start buying baby stuff, I'd recommend getting one or two very small, inexpensive things to begin with, like socks or bibs. They can give you something tangible to look at and hold and may help offer you hope for the future. I really wouldn't be thinking of buying anything bigger or more expensive until much later on.
By all means browse for baby things you like! There's absolutely no harm in window shopping and it can help you build an inventory of things you'd like to look at or buy later on in pregnancy. Babies seem to need a lot of stuff these days so doing research on products which would work best for you early on is never a bad thing.
Nobody should be telling you what to buy or when to buy it. Pregnancy is hugely exciting and I understand the urge to crack on and start preparing but there are other ways you can prepare without having a house full of stuff. You can start putting money aside for things you want to buy later on, for example. You could also make a scrap-book type thing of products and ideas which interest you.
When you get past ABOUT 20 ish weeks, you could start looking at things which might need to be pre-ordered, such as a pram if you're hoping to buy a new one.
Lastly, focus on your pregnancy rather than immediately buying physical stuff and ENJOY IT!
Best of luck.