As early as possible. You need to disembark, pick up your bags, go thru customs and then wait for a car to get thru traffic to pick you up. The airport is about one hour from San Pedro but you will be in morning traffic so could be longer. You need to get there at least 2 hours before for an international flight..they actually say 3. The airport is massive and the traffic coming in with the construction is a mess at normal times but commute times even worse.
I would ask the driver you book what they think about time. A company called BEST VIP can help but they are expensive.