Here’s another type to give thought: Grass/Electric. It’s neutral to Flying and Ground, and resists Water. It blows Tomohawk away, as 130 Special Attack Modest Thunderbolt has a 3 in 5 chance to OHKO Tomo. I’m on Mobile so I can’t show it, but if either a mod can edit it in this post or someone else to post it, that’d be great. With Grass/Electric, STAB moves alone take down Ash Gren, Mega Swampert, Pelipper, Hawlucha, and Tornadus-Therian. Basically, only Kingdra resists our STABs on rain teams, so there’s that. As for use in Sand, Grass helps break Ground-types that usually eat Sand for lunch. In Sun, it has Solar Beam, or we could go with a fun ability for Sun. Overall, Grass/Electric is a rather decent type to consider.
You could say the same for
Ice, rather than Electric; which also gives STAB on Freeze-Dry, to OHKO Pelipper, Mega-Swampert, Kingdra, or allows Ice Beam to do the same against Tomohawk and OHKO; it could even OHKO with Freeze-Dry with Choice Specs. Tornadus-T gets beaten, Hawlucha gets beaten. For reasons stated above, I'm not sure that counting Solar Beam as a go-to ability should be a thing; it telegraphs so brazenly that if Sun is up, and we have a Solar Beam abuser is out, Pelipper will switch in, before switching to Ferrothorn. I absolutely agree it should be in for flavour as a Sun-using mon, but that 2 turn wind up limits it to Grassium-Z users competitively IMHO, unless there's a guarantee. Solar Beam in the sun is one of those "nice to have" abilities, and can even be buffed with abilities like Flower Gift, but that then creates an issue
With Ice as well, it's going to need something that can knock away rocks; on a sand team, the simplest option is old-mate Excadrill, while on Sun, there is Torkoal, but there is also the option of bringing in Sunny Day Tomohawk as a secondary setter also well as defog and Solar Beam; as well as bring down some Stealth Rocks that will hurt Pelipper (breaking Sash etc).
I'm going to propose
Water/
Grass, however. If we absolutely need have resistance to Electric as a priority, there is always an ability to walk into those attacks with another mon (such as Manectric. At +1, it can OHKO M-Swampert with HP-Grass). If we absolutely need to have resistance to Hurricane, well, that's what Levitate Magnezone, Stakataka or TTar, AV'd or otherwise can be for (the latter, especially, thanks to the 50% Accuracy, SE STAB vs Flying, and it's sheer Special fatness).
Rain provides a boost to Water-types, that's obvious, but there are already plenty of Water-abusers on a Rain Dance team, so it's not as though it needs to be a Water-Sweeper. If it ends up getting Drought, then it's super resilient about switching into Water-type attacks; 4* Resistant on top of the Power Drop from Sun. And in the sun, it's lack of powerful water-type attacks means that it can encourage use other than its STABs OR use Water to provide some Chip+Status effects like Burns, Flinches or Def drops through Scald, Waterfall or Razor Shell. In the rain, Waterfall and Scald are 2HKO after Rocks vs Mega Swampert even at 90 Att/SpA, so it's not like it's toothless.
Flying, Poison and Bug are 2* Weaknesses vs
Water/Grass; Poison is largely a rarity, outside of Crucibelle, who isn't going to get along well with the weakness to water, while Greninja is going to be susceptible to the Grass and/or freeze-dry. There's also Hoopa-U, but I don't think I've seen a Rain Team utilize it; that said, Hoopa-U could provide a viable foil to any Greninja running Extrasensory. The Bug weakness comes from Lando-T, Colossoil, Crucibelle, Syclant, Volkraken, etc, none of whom are particularly going to enjoy different aspects of a Sun or Sand team, or a mon like CAP24 who may be packing Ice coverage, even if they don't have Freeze-Dry.
As for Tapu-Koko, well, on a sand team there's a plethora of Ground users, and on a Sun team, you could give it some ground, steel, or poison coverage, or make use of something like Marowak-A; whose back you cover by being able to withstand Ground. Tomohawk etc is going to be susceptible to Tapu Lele, thanks to the lack of Priority, and Koko won't appreciate it either if you can U-Turn/Volt Switch in Lele before Hawlucha gets it seed off (phrasing, I know).
This typing has some specifically designed defensive holes that encourage certain switch-ins, while being able to hurt those switch-ins through typing, coverage, set-up, by those mons' be weak to the other members of the team. One of the weaknesses of the weather teams is that they're too reliant on the weather to do their thing, but Rain is able to function well without need for weather up. it simply gets empowered with the Rain up, shoring up defensive weaknesses. Water/Grass inverts the strength of Rain, while providing useful hitting power elsewhere.