1. He told the students a funny story.

2. A funny story was told the students by him.
3. A funny story was told to the students by him.
4. The students were told a funny story by him.

(#1 is an active voice sentence. When we change the active voice sentence into passive voice sentences, which ones are grammatical among from 2-4? Do we have to use 'to' as in Sentence 3?)

I understand the exercise of changing active into passive, but all these passive sentences read awkwardly. I don't know of any other ways to write #1 in passive, but active is always better.

I would use #s 2 and 4, but not #3.

When converting an active voice sentence to passive voice, there are a few rules to follow:

1. The subject of the active sentence becomes the object of the passive sentence.
2. The verb is changed to a passive form (usually made by adding a form of "be" + the past participle of the main verb).
3. The object of the active sentence becomes the subject of the passive sentence (optional).
4. If the active sentence has an indirect object, it can become the subject of the passive sentence (optional).

Now, let's apply these rules to the given sentences:

1. "He told the students a funny story." - This is an active voice sentence.
2. "A funny story was told the students by him." - This sentence is not grammatical in passive voice. The word order is incorrect. It should be "A funny story was told to the students by him." This sentence follows the rules of passive voice correctly.
3. "A funny story was told to the students by him." - This sentence is grammatical in the passive voice. It follows the rules of passive voice by changing the subject to the object and using "to" in front of the indirect object.
4. "The students were told a funny story by him." - This sentence is grammatical in the passive voice. It follows the rules of passive voice by changing the subject to the object and maintaining the order of the remaining sentence components.

So, sentences 3 and 4 are both grammatical. In sentence 3, "to" is required before the indirect object (the students). However, in sentence 4, the use of "to" is optional, and the meaning remains the same without it.