Midfielder Locatelli started and finished the move from which he opened the scoring, netting from close range following Sassuolo team mate Domenico Berardi's excellent run down the right wing. He then rifled a shot into the bottom corner of the net from the edge of the box early in the second half.
Ciro Immobile added a late third to secure back-to-back 3-0 wins for Italy in the tournament, which extends their unbeaten run to 29 games, the last 10 of which have been victories where they have scored 31 goals and conceded none.
Italy, who beat Turkey in their opener, lead Group A with six points after two rounds of matches and are ahead of Wales (four), Switzerland (one) and Turkey (zero). They can seal top spot with a draw in their final group game against Wales on Sunday when the Swiss face Turkey.
"We won the game thinking we wanted to win it at all costs," Italy coach Roberto Mancini said. "It was a very tough match. We could have scored a second goal a bit earlier. We suffered when we had to suffer but in the end it's a well-deserved victory."
"It was the second game in five days and the boys have worked a lot. We could have sealed it earlier but we stayed patient."
The Italians outclassed their opponents and delighted the home crowd who have now seen their side score three times in a European Championship match for the second game in a row having never done so previously.
Italy skipper Giorgio Chiellini, making his 14th European Championship appearance, more than any other outfield player for Italy, thought he had scored when he powered past two defenders to fire in from close range only for his effort to be ruled out for handball.
The Italians were not to be denied, however, even after Chiellini went off injured, with Locatelli launching a move with a brilliant pass and then finishing it off after Berardi had cut in from the right in the 26th minute.
The Swiss pressed high after the break in search of an equaliser but it was Italy who scored again with Locatelli rifling in from the edge of the box for his second goal of the evening.
"Two goals for a midfielder are not easy at all and not a given," Mancini said. "Manuel played a great match. His action in the first goal was great."
Italy keeper Gianluigi Donnarumma stopped a double effort from Steven Zuber in the 64th minute to protect their flawless record over the last 10 games, before Immobile twice fired narrowly wide.
The Italy striker did get onto the scoresheet in the 89th minute, however, thumping in his shot from 20 metres to beat keeper Yann Sommer.
Switzerland have now won none of their last nine matches against Italy and last beat their neighbours 28 years ago.