English has two styles of sentences. The active voice shows us who is performing the action. Here are some examples of the active voice:
- Jane cooked dinner last night. (“Cooked” is the action, and Jane did the action)
- The police will close the road at 5:00pm. (“Will close” is the action, an the police will do the action)
The passive voice shows us the result of the action. Sometimes we do not mention who performs the action, as the result of the action is more important:
- The road will be closed at 5:00pm.
- The road will be closed at 5:00pm by the police.
When we know who is doing the action, native speakers prefer to use the active voice.
Thus the sentence: “Last night, dinner was cooked by Jane” is gramaticaly correct, but completely unnatural. Native English speakers would just say, “Jane cooked dinner last night.”
Never use the passive voice when you know who is doing the action.