She does homework in the evening.
"The" can be used in a lot ways (See M-W). There are two uses that apply here.
"The" can be used for specificity in relation to one component or portion of the whole, or a specific category of something rather than a specific individual thing. If you have a bag of mixed jelly beans, you can talk about the orange ones. If you have a population of people of different ages, you can talk about the children. If you divide a day into morning, afternoon, evening, and night, you can talk about the evening. "The" doesn't refer to a specific example, rather a specific subset or category.
The "category" aspect is closely related to another usage of "the", referring to something conceptually or generically. "The lion is king of the jungle" doesn't refer to a specific lion or a specific jungle. It refers to "lion" and "jungle" conceptually; lion, the kind of animal, and jungle, the kind of place. "The evening" is used in that sense here; evening conceptually, as a period of day.
She does homework in evenings.
"In" is not idiomatic here, but you could say "She does homework evenings."
With no article and the plural, you could argue that it's either a reference to evenings conceptually, similar to "in the evening", or a meaning similar to "She does homework [most] evenings"; a regular activity that happens on many actual evenings.