Can I use WD-40 or WD-50 to clean a bike chain?
It is a debatable topic but due to its properties, you can indeed use it to degrease/clean your chain. However, I would only use it for that, "classic" (*) WD-40 is not a good lubricant, simply because it is too "thin" compared to proper lubrication products. On the long run, you are also better off with a specific degreaser and get better results, i.e. dirt and oil getting removed.
After degreasing, you should remove any residues of WD-40 (to avoid interference with new lube), make sure that the chain is dry and reapply lubrication with a suitable product.
We don't give any product advice here but in my opinion, regular cleaning is more important than the product chosen. Not properly applying lube or riding too long intervals respectively on a dirty chain is doing more damage than finishing a ride on a cheap oil if all else fails.
I would suggest a good quality bike-specific oil with suitable attributes for your typical riding conditions (basically: dry or wet). Wet-condition-specific oils typically stick to the chain better but also pull more dirt, so you might want to choose a type of oil for dry conditions if you're mostly riding in good weather and get away with slightly longer cleaning intervals, simply because the chain gets less dirty.
Dry lubes or even waxing your chain are also possibilities but the former isn't suited for wet riding (and in my experience doesn't last too long, either), waxing can be quite a complicated process that requires taking your chain off, time and tools.
(*) I wrote classic WD-40 because there is the multi-function product we all know, and my explanations focus on that. However, the company in question also offers specific bike products such as degreasers, wet/dry oils and sprays, the latter with cleaning and lubrication properties, as far as I know. These can indeed be understood as an alternative to any oil or degreaser being referred to in the answer.