The hot, wet, evenly-warm equatorial climate is the foundation of the rainforest's layered structure, but it works together with the competition it creates and with the soils, so it is the main rather than the only reason.
The climate drives the structure directly. Year-round high temperatures (~27°C) and very heavy rainfall (2,000mm+) with no real dry season mean there is no cold or drought to halt growth, so plants grow continuously and very tall. Abundant sunlight at the top is the prize, so trees grow upward to reach it. This produces the vertical layering: a few giant emergent trees breaking through into full sun, a continuous canopy at 30-45m capturing most of the light, and a darkened under-canopy and shrub/ground floor below, where only the small percentage of light that filters through can support shade-tolerant plants. The light gradient created by climate-driven growth is essentially what defines the four layers.
The climate also explains the structure indirectly through the nutrient cycle. Heat and humidity make decomposition extremely fast and heavy rain causes leaching, so the soil stays thin and infertile; nutrients are held in the biomass. Thin soils are why trees evolved shallow roots and buttress supports, which is part of the forest's physical structure.
However, climate is not the whole story. The structure is just as much a response to competition for light between the plants themselves — a biotic interrelationship — and to the adaptations (drip tips, lianas, epiphytes) that let plants exploit each layer. The animals that occupy and connect the layers also shape the ecosystem.
Overall, I largely agree: the equatorial climate is the main reason, because without its year-round heat, rain and light there would be no continuous tall growth and therefore no layering. But the precise structure emerges from the climate acting through competition, adaptation and poor soils, so climate is best seen as the essential driver working with biotic factors rather than acting alone.