It is the faster Pokemon has its ability activate first if I recall correctly. This is why some people prefer to have slower weather starters so as to make it so if they switch in at the same time as another weather starter their weather is kept.
Source Looking for more.