The previous answer is good, but I don't think it elaborated enough on the downsides. While wavedashing is indeed a great tool, it does - as any other option - come at some costs.
Wavedashing on a platform or when landing ("wavelanding") is relatively safe and another topic altogether, but it's important to realize that wavedashing on its own is two different options. Wavedashing away from the opponent is evasive and useful when you want to retreat without turning around, and wavedashing towards them is offensive and useful when you don't want to have the limitations of dashing. Overall a wavedash is slower than dashing since you need to go through the prejump animations, but using both dashing and wavedashing together is a very effective way to move around.
First, the retreating wavedash; it is the one that most low to medium level players have trouble with. Its most effective usage on low to medium level play is to fix your spacing when you commit to a bad dash or want to retreat just a little, and on high level play to bait a reaction from the opponent and to mix the movement patterns up.
Specifically in low to medium level play, the primary cost for using wavedash evasively is a loss of pressure and stage control. While the benefits very often outweigh the costs, it is important to capitalize on the tradeoff your opponent is taking when wavedashing.
The "book solution" for almost all characters is to avoid doing an immediate attack (since the opponent moved out of range), and to adjust your own spacing to get a bit closer. This will force the opponent a bit more towards the ledge, to make them more likely commit, etc. Wavedashing a short distance towards them yourself might not be a bad idea either (depending on matchup), for example. If you play a character like Fox or Falco and read that the opponent will wavedash, you can try to overextend an attack and start pressure from there. On a hard read, one option that will surprise the opponent is to dash in and JC grab them from the position they will end up at after the wavedash. Whatever you do, it's important to remember that the opponent can and will wavedash, and you need to think about where they will end up at rather than where they are right now.
Playing against offensive wavedashing is in many ways similar to playing against dashing and approaches in general. You could simply put out an attack and they will not be able to come as close as they may want without taking risks. The standard mixup for them is to wavedash into crouch cancel or shield, and you will need to be on the lookout for that. You could also (wave)dash backwards and bait an attack from them, then dash in and punish. Observing the opponent's character while playing is the key to learning their habits quickly.
It might be useful to watch high level matches from Youtube at 0.25x speed, and see what the other player does when they react to the opponent wavedash. Do they adjust their dash dance to get a tiny bit closer or further? Do they use that as an opportunity for a normally under- or overextended attack? Do they try to wavedash themselves? In what circumstances does a player wavedash towards the other one rather than away from them? Is it more common to wavedash aggressively or as an evasive measure?
Concentrating on these kinds of things when watching will help you formulate a strategy of your own against wavedashes. Then you can try a strategy out, see how it goes, and watch some more to learn from your mistakes. Try to see things from your opponent's perspective and adjust accordingly.
Finally, do remember that anything done in excess makes you predictable. While taking the advantage is important, it's not worth going out of your way to take risks every time the opponent wavedashes. If the opponent does nothing but simply wavedash, feel free to take the advantage in a simple way, but if they only do it occasionally, do try to avoid becoming predictable and mix up your approaches. Happy smashing!