Königstein castle can be reached by Dresden by the train line S1 in the direction of Schona. The station is Königstein. From the station you can trek up to the castle or take a toy train and bus for 4EUR.
Königstein can also be reached by boat on the river Elbe from Dresden. (http://www.festung-koenig...)