The pair put on 191 for the first wicket before Westley was trapped lbw by spinner Jeetan Patel for 108.
Pettini struck 126, with 10 fours and two sixes, as Essex piled up 320-5.
Warwickshire and former England batsman Jonathan Trott made 51, but he was removed by Westley (2-26) as the visitors were bowled out for 168.
Left-armer Reece Topley also shone with the ball for the hosts claiming 4-29.
Essex now top the early Group B table with two wins and a no result, while Warwickshire are bottom with two defeats and a washed out game.
Essex opener Tom Westley:
"I wouldn't say it was a difficult wicket but we had to work hard for the runs so to put on 191 with Mark (Pettini) for the first wicket was very rewarding.
"That set the platform for others to come in and finish the job off. Then the way the bowlers backed that up was fantastic."
Warwickshire director of cricket Dougie Brown:
"Essex played very well but was a still a disappointing result, more so because we failed to reach the standards we set ourselves."
Openers Mark Pettini and Tom Westley both hit centuries as Essex thumped Warwickshire by 152 runs in the One-Day Cup at Chelmsford.