If you switch teams in the middle of an event, your points will stay with your previous team. Any new points you earn will only count towards your new team if said team are in the same league as your previous team. At the end of the event, you will be able to receive the rewards earned based on your new team's ranking.
Other reasons for not being able to score is when someone on the team was able to perform a team quest progression. Once they progress, they are registered as part of the 50 contributors. For more information of who are those contributors, they are the ones placed between number 1 - 50 on the team contribution page under Event Page > Prizes and Ranks > Teammate Contribution. Players with the N/A and at the same time, a number is showing, it means that they were once part of the team, contributed and left the team or kicked out for unknown reasons. Those with no number are players that was not able to contribute or progress through their team quest before the others or a recently recruited member.
For Atlas related events, you can still gain points, but will not be able to contribute for your team if you join in the middle of the event. Even if you joined back to your original team, future contribution is turned off until the next event goes live