This sounds like one of Jerry Baker's wacky tonics although even he doesn't recommend detergent except for dish detergent aka regular dish soap. A real detergent will likely harm the plant.
While some of his suggestions are odd and I don't think there's much scientific research done on his tonics as a whole there is some merit to a few of his ingredients.
Dish soap contains surfactants and surfactants can help hydrate soils and relieve compaction but only for soils that have become hydroscopic. Some people use baby shampoo instead. However research indicates that it's very rare that a homeowner would have hydrophobic soil and mechanical aeration is better than surfactants. (link to my website)
If you're talking about a potted plant with a peat based potting medium then those can go hydrophobic when they get very dry. In that case a surfactant or wetting agent may help quickly hydrate the potting mix but you could also place the container in tepid water to speed up hydration.
Soaps also contain phosphates so if your soil/plant needs phosphorous it's another way to give it to it but it's not like you can't get phosphorous to fertilize your plant with. Commercial growers tend to use wetting agents when hydrating their potting mixes because it's faster and time is money.
So a detergent like laundry detergent no, it will likely harm the plant. Dish soap and baby shampoo might offer some benefits under certain conditions but you can achieve the same results with other products or methods meant for use on plants.