Capsaicin the ingredient that puts the "hot" in hot peppers has been shown to be an effective repellent to insects.
Note that this is REPEL and not KILL. l.
A study done in 2002 indicated that whiteflies and mites were repelled for almost 2 months.
These studies were conducted in a greenhouse so it is highly unlikely that the spray would last for that long in an outdoor situation.
Capsaicin is likely to help control insect infestations especially mites and whiteflies.
Because it is a repellent rather than a poison, don't expect it to wipe out the pests overnight, or eradicate them for long.
Homemade hot pepper sprays will not be as effective as commercial sprays, primarily because commercial producers put more time and effort into making sprays than homeowners. Most commercial sprays include additives that allow the spray to stay on the plants for a longer period of time those homemade sprays will.