I think
Die Leute sollen nicht pessimistisch sein.
is correct and a good translation in most cases. You could also use the indefinite pronoun man in this case:
Man soll nicht pessimistisch sein.
The difference between "die Leute" and "man" is just a nuance. The first one sounds more a statement related to a specific topic or time, the second one is more of a general assertion. Also, "die Leute" means "the society" or "the public."
Example:
Die Wirtschaft beginnt wieder zu wachsen. Die Leute sollen nicht pessimistisch sein.
vs.
Mein Vater hat immer wieder gesagt, man soll nicht pessimistisch sein.
"Der Mensch" sounds a little old-fashioned as if it was taken from a book of sayings:
Der Mensch soll nicht pessimistisch sein.
However, using "die Menschen" is acceptable in this case:
Die Menschen sollen nicht pessimistisch sein.
It has the same connotation as "Man soll..."
As you cannot force people to be optimistic, you can only suggest that it would be better. I would guess it's like saying "people must not be pessimistic" instead of "shouldn't be" in English.
– ladybug Jun 27 '11 at 11:56