There is no set length of time it should take to write a screenplay, but professional screenwriters are often given deadlines they have to meet, so being able to write quickly and efficiently is certainly an asset.
Feature deals usually allow for a 12-week writing period for the first draft, but the deadline is often flexible. TV writers are often asked to turn around an episode in less than a week.
In a 2008 blog post, John August says this:
I’m hesitant to give a firm number for how many weeks it should take to write a script. Every project is different. […] [T]he better question to ask: How quickly should a professional screenwriter be able to turn around a script, given some urgency? In my experience, the most successful screenwriters are the ones who are able to accurately estimate how much time they’ll need. […] For feature films, I’d be reluctant to hire a writer who couldn’t deliver a script in eight weeks.