I would place a third pallet across the top that is constructed from hardwood and screw into the vertical pallets. Then put cross braces on all 4 corners like this which will stop lateral movement.
Would be worthwhile securing the vertical pallets to the ground too which could be as simple as hammering pegs on either side of the pallets, or building a frame around the base which could be bolted to the vertical pallets.
RE: Pallet water tower brainstorm. Seeking advice