TL;DR: Try go catch the 8:20 Via Rail from Union Station to Niagara Falls, arriving 10:16, if it runs on your day. If not, public transportation is going to be very time-consuming but possible.
It's quite possible to get from Toronto Pearson via Union Station to Niagara Falls, but you won't have a lot of time left to spend there. The cheapest way to get from Toronto Pearson to central Toronto (Union Station) is by TTC, with the Airport Rocket followed by metro. This will take more than an hour and costs 3.25$ each way. If you are in a hurry, you can take the Union Pearson Express which only takes 25 minutes and costs 12$ each way, faster and cheaper than a taxi.
From there you can take GO Transit (train+bus), VIA Rail (train, seasonal, once per day) or Greyhound (bus).
Intermezzo: Warning: Do not expect European quality public transportation in almost any North American city, and certainly not outside of them. Even between cities, public transportation in southern Ontario is incredibly poor¹. This is not Paris, London, or Berlin. Trains within Toronto are poor, suburban trains in the region around Toronto are extremely bad, in particular on weekends. For example: Kitchener (500k inh.) to Toronto (2.7 million), 100 km, has 4 trains/day, weekdays only, taking 2 hours (bus takes 3); Oxford (170k inh.) to London (8.7 million), 95 km, has 72 trains/day, taking less than 1 hour. The Scottish Highlands have more frequent trains than cities near Toronto.
(It's the main reason why I left Toronto; my driving skills suffice to pass the test in The Netherlands, not so in Toronto, so I was essentially stuck; I did carpool out of the city a couple of times; once it took 3 hours in traffic to get out 60 km from the city centre; I also remember being stuck in traffic with a bus, 100 km out of Toronto, midnight after a Bank Holiday weekend.)
Still reading after the intermezzo?
GO Transit operates trains and buses between Toronto and Niagara Falls: see timetable. There are many services per day. It will take roughly an hour to reach Burlington, where you change from train to bus, then it's another 1 hour 35 minutes by bus. Depending on your connection, it will take almost 3 hours from central Toronto to Niagara Falls, excluding delays. Price for a day pass is $37.50.
There is also, at most 1 train per day run by VIA Rail. I think it runs seasonally. When it does run, it departs 8:20 from Union Station, arriving 10:16. As far as public transportation goes, it is your best bet, assuming you can make it and it runs on the day of your transit, that's probably the most comfortable option. The return is too late for your flight, though.
If you have some time left after awe-ing at the falls, I recommend a hike in the Niagara Glen nature reserve, peace and quiet just a stone throw away from the Ripley-Believe-It-Or-Not-esque tourist madness that is Niagara Falls as soon as you turn around and face the town rather than the falls. There's also a really nice butterfly garden. Churchill said that the road between Niagara-on-the-Lake and Niagara Falls was the most beautiful one in the world but he was mad and/or liked wine too much. It's nice but not most-beautiful-in-the-world-nice. If you're driving anyway, Niagara-on-the-Lake is probably worth the detour.
If you choose to drive, make sure you are comfortable driving on the rather huge and congested roads in the Toronto area, although the airport is west of town so you will avoid the worst part of the 401 (which has up to 17 lanes).
¹Apparently, there are similar-sized cities where it's even worse, but I have no firsthand experience of those.