Short answer: Yes — but only for limited periods, and usually with battery support.
Air conditioning is the single largest electrical load on most cruising boats. A typical marine air conditioner draws between:
That means solar alone usually can't run air conditioning continuously — especially overnight.
Many liveaboards use solar to recharge batteries during the day, then run air conditioning overnight from stored power.
Instead of guessing, you can simulate your exact system.
Try the Boat Power Simulator