It’s important to only select lychees that are already ripe, as they will not ripen any further once they have been picked from the tree (via SFGate). Eating unripe lychees can be dangerous, as they contain an increased level of a toxin that has been tied to the deaths of a number of children in northern India (via Proactive Health Labs).
When buying lychees from the market (or picking them from the tree), look for ones that have “vibrantly colored skin,” whether red, pink, or orange, and are more than an inch in diameter (via The Spruce Eats). Ripe lychees also give off a floral scent, and when pressed, the skin should give a little, though not too much (via Taste of Home). Avoid lychees that are “cracked, leaking juices, or are blemished with a sour taste” as they are likely too ripe, or even spoiled (via Produce Made Simple). According to Eating Well, the delicate fruits will be in peak form from May to September in the US, and you can expect them to last for around a week in the fridge.