Bang Pa In rail station, with the old royal waiting room in the background.
If you want to visit Bang Pa In palace on your own, the easiest way is by train. Most north and northeast-bound trains departing Hualampong Station in Bangkok stop at Bang Pa In station. Your best bets for a day trip are trains leaving at 7:00 am (train no. 111) or 9:25 am (train no. 201). Third-class fare is around 12 Baht (0.32 USD).
On arrival, there are usually songtaews waiting at the station, who will take you to the palace for 60 Baht (1.60 USD). You can also simply walk the 2 kilometers to the palace (see the map below). It's about a 15 minute walk.
Map of the Bang Pa In palace area.
It's worth noting that while the palace is a standard stop on packaged day trips to Ayuthaya, when you're on your own, and using the train, it isn't practical to do both destinations in one day. If you really want to see both places, the best option would be to plan on spending a night in Ayuthaya. You can stop in Bang Pa In, then continue on to Ayuthaya, and have a good day seeing the many sights there before returning to Bangkok.