Can I ride my ebike in the rain and the short answer is yes. Whether you are riding a brand ebike or a conversion kit you can ride them both in the rain safely and I will tell you why. However if you end up with your ebike submerged in a lake, I can’t help you and all bets are off.
With a lot of brand ebikes either the controller and battery are built into the frame sealing both out from any external weather conditions. With bikes based on kits lets look at the individual parts. Starting with your battery, it is completely sealed other than your charger port. Most batteries come with a charger port door that seals shut and is weatherproof. Your motor whether hub or mid drive are also completely sealed with no ability for moisture to enter.
The only area where there is some possibility for water and moisture to penetrate is your controller. The controllers are typically water tight other than where the wires exit the controller. Here you want to tightly wrap electrical tape around the port so it is water tight and make sure that you have wrapped your wires with waterproof polymer based casing so that no water can penetrate.
The biggest problems you will have with rain are bike problems, getting your drive train we if not properly cared for will rust. When you get back from a wet ride make sure to wipe everything down with a dry rag, set the bike in a dry place and relubricate all moving parts before your next ride.