Let's work this backwards. And there is a huge "however" at the end.
To actually get into Hampton Court Palace is around a 20 minute walk from Hampton Court train station, so you need to arrive at the train station before 1510. 1505 hours if you're not shaving it tight.
https://goo.gl/maps/hxCfL183SgM2
To get there by 1505 on a Sunday, you'd be on the 1427 train out of Waterloo, calling at Vauxhall, Clapham Junction, and so on.
http://ojp.nationalrail.co.uk/service/timesandfares/London/HMC/220418/1500/arr
To get to Waterloo for that train, you need a tube from Tower Hill on the Circle or District Westbound to Embankment and then the Bakerloo Southbound the one station to Waterloo. It's a 10 minute walk from the Tower itself to Tower Hill tube and a 15 minute tube ride including the change, walk to platform, and the walk out of Waterloo tube to get your train. I'd leave half an hour so that's leaving the Tower Of London itself at 1357 at the latest. Twelve minutes to spare.
It's a veritable squeaker, but it's possible...
...here it comes...
HOWEVER
...you're going on a Sunday. Sundays mean engineering works on the Tube are possible, and lower frequency of tube trains, and engineering works are possible on the train line out of Waterloo. You're depending on the White Tower tour ending pretty much at 1345 and then hoping all the dominoes fall as they should.
This is totally your call.