You can find time tables for trains and buses here. The best way to get to Smolenice (Castle) from Bratislava (Central Bus Station, Mlynské Nivy - in Slovak stated as Bratislava,AS MHD) is by bus. If you will travel to Bratislava (Central Railway Station) by train, you can take the trolley-bus No.210 to get to the Bratislava Central Bus Station (Mlynské Nivy). You should buy a 30min ticket for 18SKK in advance in a kiosk.
If you plan to travel by car, please note, that it is possible to park right on the patio of the Smolenice Castle. In this case you can ignore the trafic sign "DO NOT ENTER" and drive right up to the Smolenice Castle.