There is no direct train from coimbatore Nearest railway station is Rishikesh or Haridwar. You can take Madurai Dehradun Express 12687 or Kochuveli-Dehradun Weekly SF Express 12287 to Haridwar Junction. From there by bus to Badrinath. The ideal time is from May to October, except monsoons (July to mid-September) .During the monsoon season, there is undue threat of having landslides, which can further disrupt the journey for a couple of days to week. So it is advisable to avoid during monsoon season.