Star trek DOES show a positive outlook at the future, but it also explores lots of things that at the time of the airing were controversial and difficult for shows to address without getting hate mail.
Star trek has the first ever televised racial kiss (Kirk made out with Uhura) that was big... that was unthinkable to be had at the time and many people were shocked, but it also showed the world that black woman CAN be just as sexy and worthy of a main role as white women.
Star Trek was also i think the first show on TV to cast a Black Woman as a reocuring MAIN character.
It also had a varied and mixed crew, Scottish engineer, Russian weapons officer, Japanese navigation officer, black comms officer as well as the white cast.
TNG explored the first lesbian kiss on T.V, it also explored a lot of philosophical things that make people think.
DS9 went into alot of religious waters as well as in the later seasons dealt with terrorism and eventually war.
Not only that, but alot of the stories were well told and fun to watch, Anything with "Q" in it is a good episode in my books, but the episode where Tasha Yar was killed by the Tar Creature was a very sad episode and the way they dealt with it didn't seem so much like they killed the character for any old reason, they killed the character such a senseless way that it made it seem more real, like any of the characters could just die, but her will was inspiring and wonderful.
Personaly I hated DS9 when it first aired, the first season was cool, it was a new premise, something we'd not seen before in trek, but it got stagnent when it was the same thing over and over again on the same station, but when they got the defiant assigned to DS9 and the Dominion war broke out the Stories became mroe gritty and there was for the first time in star trek history a sense that it could all unravel at any second and the federation could be consumed by a massive quadrent wide war.
The story telling really got much better when they started doing war arc stories and got into the darker side of the federation, sure they stand for peace, but when push comes to shove they will stop at nothing to restore that peace, even at the cost of hundreds of ships and tens of thousands of lives.
But not only is trek great for those reasons, it also spans like what... 40 years of television, 11 movies and 5 series? thats pretty damn impressive.
to sum it all up, Star Trek Really did go where no man (or T.V Show) has gone before. well... before society started to accept this stuff and now it's commonplace, but Star trek really did alot for television.