Algeciras is recommended by IndependenTrip as a one day trip from Seville as well as from Cadiz. Consult other one day trips from Seville and Cadiz:
There is no direct train Cadiz-Algeciras (or vice-versa). The best alternative route is through Cordoba.