Temperature primarily affects the distribution of organisms in an ecosystem. Temperature is a crucial factor that influences the survival, growth, and reproductive capabilities of organisms. Different species have specific temperature requirements and tolerance ranges.