I've done some calculations on exactly that idea, for a trawler yacht of around 25 feet.
All of the below is from memory but I can look up my calculations if anyone wants more accurate numbers. It's based on a trawler yacht of around 25 feet LOA. I think I used one of Glen-L designs as my assumed hull design.
- You need quite a large battery that you charge for the trip. I think I based my calculations on 100 kW.h, assuming that by the time I get around to building such a boat it will be possible to get a used car battery with 100 kW.h still in it. (That's not feasible yet, but it probably will be in a few years.)
- You need a lot of solar panel area. Plaster the roof and a canopy over the aft deck with solar panels. I think I based my calculations on panels covering an area 2.5 m wide (8 feet ish) by 4 m long (14 feet ish). I did not look into the cost of that, I just assumed that it would be cost-feasible by the time I got around to doing it.
- Cruise speed must be well below hull speed. I think I assumed a normal cruise of 3 or maybe 4 knots. You have to get motor power output down to around 5-7 kW (under 10 hp). I didn't consider anything other than calm water. Obviously, in rougher conditions your charge consumption is going to be higher.
Under those conditions, you can cruise for (IIRC) about five days before needing to recharge. So, either trips not longer than four or five days until you're back on the trailer or, if feasible, recharging in a marina. However, I'm not sure how feasible recharging in a marina will be in the real world. Even on a 30 A circuit you're looking at over a day of charging to put 80 kW.h into the batteries.
So, best case scenario, your trip plan is either maximum four or maybe five days on the water (assuming you actually travel each day) or four or five days travelling followed by 2-3 days recharging in a marina. Assuming you can find marinas that will even let you do that.
You could stay on the water indefinitely if you're willing to stay at anchor every other day, or something like that.