The attacker, who joined Leeds in 2020, was named the English Championship's player of the season in 2023-24 after scoring 19 goals and providing nine assists.
The transfer fee was not disclosed, though media reports put the deal in excess of 25 million pounds ($32 million).
"It's the perfect next step for my career. West Ham United is a huge club, with lots of ambition and great players," Summerville said in a statement.
West Ham begin their Premier League campaign at home against Aston Villa on August 17.