For example, is it better to say
Would you prefer for me to come in today or tomorrow?
or
Would you prefer me to come in today or tomorrow?
What is the grammatical reason for including the 'for' after 'prefer'—or for leaving it out?
For example, is it better to say
Would you prefer for me to come in today or tomorrow?
or
Would you prefer me to come in today or tomorrow?
What is the grammatical reason for including the 'for' after 'prefer'—or for leaving it out?
This is a rather tricky question. Although prefer can certainly be used transitively with a to-infinitival following the object, the inclusion of 'for' before the direct object is not ungrammatical per se. There may be limitations on its use, and it may subtly alter the meaning. This usage of for + DO + to-infinitive is more general than this particular example, and is analysed by Jackie Nordstrom in Modality and Subordinators (slightly tweaked / reformatted):
[It] will be demonstrated that for in the for-to construction must be considered a preposition, like its homonym from which it derives.
Interestingly, the for-to construction can be associated with modality. Pesetsky and Torrego (2004) have observed that the for-to construction occurs in irrealis (non-actualized) contexts, or generic contexts:
(a) I would prefer/like for Sue to buy the book [non-actualized]
(b) I always prefer for my students to buy this book. [generic]
According to Palmer (2001) the habitual can also be categorized as irrealis, since it refers to tendencies rather than actual events. Following Palmer's wide definition of 'irrealis', for may therefore be considered an irrealis complementizer ...
More precisely, the for-to construction can be connected with event modality. The matrix predicate can have volative, obligative, or abilitative meanings:
(c) We want/prefer/desire for you to partake.
(d) It is necessary/mandatory/obligatory for you to partake.
(e) It is possible/doable/feasible for you to partake.
Furthermore, the for-to construction can be connected with the future, another non-actualized category, in the sense that it often has (i) future reference (specific or generic).
After certain adjectival predicates, on the other hand, the construction simply has (ii) generic reference:
(i) We have arranged for the meeting to be held on Tuesday. [future]
(ii) It is rare for the bus to be late. [no future reference; generic]
In the actual example, the unrealised / future nature certainly licenses the '... prefer for me to ...' version. And I'd say that the for-less version is more of an 'A or B?' sort of question, whereas the version with 'for' is more suggestive of 'A/B, or not?' question. Though one couldn't guarantee that this was intended.
As you can see on the Merriam-Webster definition of “prefer”, it is a transitive verb, therefore it needs no prepositions.
Thus your first sentence is wrong in this case and should not include the preposition “for”. I assume you mean your sentence as a reply to someone inviting you to their place, e.g. "Sure you can come and get it!" "Would you prefer me to come in today or tomorrow?"
In the Macmillan dictionary you can see all the different constructions of “prefer”, in you example the correct one is
prefer someone to do something: I’d prefer you to drive, if you don’t mind.
“Is there a certain time you would prefer I call you?”
“Do you prefer I call you at a certain time?”
I think the best construction would be: "Would you prefer that I come in today or tomorrow?"