"Recommend you to" vs. "recommend that you"
I recommend you to define those parameters beforehand.
I recommend that you define those parameters beforehand.
Are both sentences grammatically correct? If yes, do they mean the same thing? If yes, which one should I use?
The following variant is correct:
I recommend that you define those parameters beforehand.
You can also omit the word that, giving the following:
I recommend you define those parameters beforehand.
However, the variant with to is incorrect. The verb recommend always takes either a noun object or a subordinate clause as a complement, never an infinitive.
Actually I believe that both variants can be technically correct, but they are saying very different things, and using the "you to" variant is mostly done as a mistake where "that you" would have been correct.
I recommend that you define those parameters beforehand -> my recommendation (to you) is that those parameters should be defined beforehand.
I recommend you to define those parameters beforehand -> my recommendation (to some other currently unspecified person) is that you are the person best-suited to the task of defining those parameters beforehand.
I think both are correct:
https://www.oxfordlearnersdictionaries.com/definition/english/recommend
recommend somebody to do something
We'd recommend you to book your flight early.
"I recommend you to define" is not correct, because the noun immediately following "recommend" is the direct object in standard usage. The example creates cognitive dissonance, because the syntax does not match the semantics: "to define" is the recommendation (or direct object), and "you" is the indirect object.
Oxford's example does not contradict this; "recommend somebody to do something" means that "somebody" is the recommendation, like in "I recommend John for the job."
I hear and see this non-standard usage many times a day in (Indian English and) the English of non-native speakers from various Asian and European countries -- and it drives me crazy! LOL