To get to Shimoda from Osaka, or Kyoto, you should take the Shinkansen (bullet train) from Shin-Osaka or Kyoto Station to Atami (141 min). From Atami take the JR Ito line to Ito (23 min) and from Ito take the Izu Kyuoko Line to Izukyu Shimoda Station (69 min).
I suggest you use Hyperdia to check for train schedules, or even better, call the super friendly folks at the JR East English info line. They will be able to help you choose the best departure time. Sometimes leaving later means arriving earlier! The number is:
(If you are calling from overseas, drop the first zero and add the country code 81)
***Please note, the name of the station you want to get off at is Izukyu Shimoda Station. If you use Hyperdia or Jorudan to search for train schedules and fares, you must use "Izukyu Shimoda" as your destination point. There are other towns and stations called Shimoda throughout Japan.
****One more note, when you are transfering in Ito or Atami, take care NOT to board a train bound for "Shimada" (with 2 A's), be sure to look for a train bound for Izukyu Shimoda.