Synaptic pruning primarily occurs during two critical periods: early childhood (roughly from birth to age 2-3) and adolescence (starting around age 10-12). During these periods, the brain is highly plastic, meaning it can easily reorganize itself by forming new synaptic connections and pruning away less useful ones. This plasticity is essential for adapting to new experiences and learning.