Passengers on all international flights arriving in the US must pass through US immigration and customs at their first arrival at a US airport. There's no "sterile" or "airside" international transfers at US airports. Thus, all arriving passengers must be admissible to US; otherwise, US immigration will refuse entry and the airline will have to fly the passenger back to the passenger's point of departure. (There's an exception for flights leaving from a US Preclearance airport overseas, where the US Immigration and Customs operates before the flight departs. CUN is not a US Precearance facility, and this exception doesn't apply to your trip.)
Generally, a visa is required to enter the US. The issue is discussed on this US State Department webpage, which notes the following:
Generally, a citizen of a foreign country who wishes to enter the United States must first obtain a visa, either a nonimmigrant visa for temporary stay, or an immigrant visa for permanent residence. Transit (C) visas are nonimmigrant visas for persons traveling in immediate and continuous transit through the United States en route to another country, with few exceptions. Immediate and continuous transit is defined as a reasonably expeditious departure of the traveler in the normal course of travel as the elements permit and assumes a prearranged itinerary without any unreasonable layover privileges. If the traveler seeks layover privileges for purposes other than for transit through the United States, such as to visit friends or engage in sightseeing, the traveler will have to qualify for the type of visa required for that purpose.
If you already have a valid visitor (B) visa, you may be able to use it to transit the United States. If you are a citizen of a participating country, you may be able to transit the United States on the Visa Waiver Program.
Italian citizens qualify for the Visa Waiver Program, which is more fully described on this other State Dept. webpage. To enter the US under the Visa Waiver Program, your passport must be valid for the intended period of stay in the US, and it must be an e-passport with an embedded electronic chip.
In addition, you'll have to secure approval from the US's Electronic System for Travel Authorization (ESTA), for which there's a $4 application fee and a further $10 fee if the application is successful.
Each Traveler Must Have a Valid ESTA. This page says:
In order to travel without a visa on the VWP, you must have authorization through the Electronic System for Travel Authorization (ESTA) prior to boarding a U.S. bound air or sea carrier. ESTA is a web-based system operated by U.S. Customs and Border Protection (CBP) to determine eligibility to travel under the VWP to the United States for tourism or business. Visit the ESTA webpage on the CBP website for more information.
The ESTA program requires an online application which can be found here. If your ESTA application is denied, you can only transfer flights within the US if you apply for and receive a valid visa of another type, probably a B (Visitor) one.
Everyone entering the US has to pick up their baggage from the dedicated baggage claim, carry it through customs, and then drop it again at the dedicated baggage drop at the customs exit, even when it is already checked through to another airport. (With thanks to Michael Hampton, whose Comment text this is.)