I'm going to make this quick, probably.
I read a post on the Rouge Wave today and one of the tips she gives is for writers to specialize in a genre. This is something that is so important to a writer, because you want to be "typecast" as the go-to guy in a specific genre. This goes for writers, directors, producers, etc.
For instance, if Eli Roth's next movie was a period piece romcom, you would be very confused. The same if Martin Scorsese came out with American Pie. It's because you know them to be in a certain genre. An audience can say, Scorsese did that movie, and I like his movies, so I'll like this one as well. In fact, audiences become rather angry if they go to a movie that isn't what they expected, because they feel doped.
But, I want to make a word of warning. Make sure you are relatively certain that:
a- You can write scripts that are sellable. (If your movies are esoteric David Lynch movies, the audience is smaller than Ben Stiller movies).
b- Make sure you will be happy writing for this genre for a long time, your career actually.
I will leave with one final idea. Just because you write one script in one genre, doesn't mean that you HAVE to write another script in that genre. When you are a baby writer, it's fun to explore ALL the possibilities. So, if you don't know what "fits" yet, write a horror, write a comedy, write a drama, or a period piece, or a kid's movie. I actually learned after writing a kid's pilot that I really love to write kid's sleuthy detective movies/tv.
It's sort of like college, some people go in knowing exactly what they want to do, others are gen ed for a while. Once they find something that suits them, then they declare. However, you should always feel free to abandon these projects after a garbage or first draft. Who knows, it's possible in 5-10 years you'll pull that draft out because someone is looking for a Polish immigrant script set in post WWII Denmark.
Personally, write(get it) now, I'm working on a broad spectrum of scripts from a crime drama, to a romcom, to a snarky independent, just because I want to see what fits FOR ME. I'm writing a TV pilot, a comic book, and five movies. I'm doing this because my main genre, independent, quirky movies doesn't pay very well and I am looking to see if there is a sub-genre or other genre that fits me better.
Once you find that genre, stick with it. Keep doing specs in that genre. I have a friend who writes really sick, twisted stuff. But she has 5 scripts right now and they're making the rounds and are being well received. When an agent looks your way, they will want to see 2-3 samples of work in a specific genre to make you sellable as a writer. It's much harder to sell a jack-of-all-trades writer than one that specializes in something.