I don't know the definitive answer to this question, and I made mine after the first contracted sale.
What I am sure about is that agents and editors do google you if they are interested in perusing further contact, and it is important to have *some online presence* that will find you. Your own website is one you control, both in content and form.
So for this reason it seems a good idea to have it. It can be simple, like a calling card of yore. For an illustrator/artist, it is important to showcase their art. For writers it's a way to present who you are.
Many writers have social media presence under their legal name and although they are findable that way, the social media sites have their own house style and don't reveal much about yours.
Don't go to much expense at this stage. You can't (yet) take it off your tax liability as a business expense before a sale. There are plenty of inexpensive and free options. Do make sure to secure your name domain, which shouldn't cost more than 10-15 dollars a year. Even less.