I'm sure there are edge cases where putting batteries in ships can make sense. Let's assume the following is true:
1) Two islands exist relatively close to each other.
2) Both have enough wind power to meet demand on windy days.
3) Deep waters, strong tidal currents, tsunami risk or some combination make power lines between the islands somewhat expensive or unreliable.
4) Battery storage is required to meet demand on days with little wind.
5) Storing these batteries on ships is not significantly more expensive than storing the batteries on land. (Maybe real estate prices are high, regulations are stricter on land, etc.)
In such a case, it may be more economical to move the ship holding the batteries than to set up cables intended just for low wind periods. And if there are many islands involved, an ecosystem of ships may scale better than cables, for instance if demand is seasonal or varies for other reasons.
Basically, these are similar reasons to why LNG regasification ships exist, instead of just building fixed land-based facilites where needed.