I'm planning a trip to Poland for July and August. I thought it would be a good idea to visit some of the other countries around Poland since I was going to be there for a little while. Two countries I want to visit are Estonia and Latvia, but I couldn't find any itineraries for Eurail. Do trains run from Tallinn or Riga to Warsaw? Or vice versa?
There is no direct train from Warsaw to Riga or Tallinn. It is possible to do the journey by train, but it's cumbersome. It takes two days and you would be traveling on local trains, mainly soviet-style Elektrichkas.
The train network in the Baltic countries is sparse and hence train travel there is hardly practical. Prefer the bus. Lux Express operates buses between the Baltic countries, and also between Vilnius and Warsaw. Within the countries there are good networks too.
If you decide to take the train, note that the Eurail and Interrail passes are not valid in Lithuania, Latvia or Estonia.
At this time the trains between Warsaw and Vilnius are suspended due to construction works. Check seat61.com to know the current situation.
The trains do run from Tallinn and Riga to Warsaw same as the other way around.
The easiest way to find them would be actually via Polish Rail site and schedule, which will allow you to search destinations in either direction and will provide you the changes needed to complete your journey.
Strangely enough (or may be not) the number of changes is actually less when travelling through Russia (St-Petersburg or Moscow) though the time using the train will be 27 hours(from/to Riga) and 37 hours(from/to Tallinn).
But as @MarcelC indicated the connection via Baltic Countries would be using the Diesel Regional Rail or Elektrichkas or you might hop onto the passing train from Russia. But for example Riga->Warsaw will take you Riga->Daugavpils->Vilnius->Kaunas->Sestokai->Warsaw. With links to and from Daugavpils on Passing Trains to/from St. Petersburg.
I took the train from Warsaw to Kaunas, then next morning from Kaunas to Riga via the early bus. I had to stay overnight in Kaunas at a nice hotel, good wine, great hotel, good food.