For the average person, it is recommended to shampoo hair every 2 to 3 days. There is no blanket recommendation as there are numerous variables that can change the amount of time between washings.
For hair that is thicker and naturally produces less oil, the less the hair needs to be washed. Naturally oily and fine hair often has to be washed more regularly. If the oil in hair is visible or the scalp is flaky or itchy, that is usually a sign that a wash is needed. Many products have been developed in recent years to extend time between washings.