As regards the railway timetable, it is complicated because Lagos is not on a main line.
Go to my blog here:
http://barlaventostravelblog.blogspot.com/
On the right hand side panel scroll down until you come to the section entitled:
Algarve & Portugal - Travel Transport Links
The first item is:
Algarve Regional Line Train Timetable
Click on it and you will be able to download in pdf format the Algarve Regional Rail line timetable.
It shows the times from Tunes to Lagos
From Lisbon you will have to change at Tunes for Lagos.
Further down the panel you will find an item:
Porto - Lisbon - Faro (Algarve) Train Timetable
Click on this to download the mainline timetable. Again you will be looking for trains from Lisboa to Tunes
As regards the buses I would concur that the train is more scenic but the EVA buses direct from Lisbon Sete Rios bus station to Lagos take only 3:45 minutes and are direct.