There are 19 states that have open primaries which allow people to vote for the presidential primary candidate of their choice. The other states require registration for one party or the other, though some allow voting day registration or change of registration.
Here's the list, according to Wikipedia:
As more and more people become independents the closed primary becomes more of a liability in terms of predicting the candidate who will have the best chance to win. These primaries exclude independents and Republicans who might cross over for the election.
This is particularly true for Bernie Sanders, who won 70% of independent voters and 25% of Republican voters in Vermont. The 2016 election is particularly ripe for independent voters and crossover Republican votes because of the polarizing campaign of Donald Trump. This situation is very ripe for Bernie Sanders, who is the left's anti-establishment candidate, but not really helpful for Hillary Clinton, who has recently reached her highest polling negatives ever.
The Boston Globe
reports Exit polls in Massachusetts show independents favored Sanders over Clinton about two to one. Six out of ten Democrats favored Clinton. The open primary format in Massachusetts allowed independents to influence the outcome so Sanders could Garner more delegates than he would have if the primary was closed.
Closed primaries "close their eyes" to the effect independents will have on general elections. That leads to wins in primaries by candidates who are not able to garner the support of independents. That is exactly what is happening in the Democratic primaries this election season.
It has become clear that Bernie Sanders will perform better in states where there are open primaries. There are, of course other factors. African Americans are voting for Hillary, so it's likely that the open primaries in Michigan, Mississippi and Missouri won't go his way. But Illinois and Wisconsin could be big for Sanders.
Democrat party insiders may argue that closed primaries make for election purity and prevent antagonistic voters intending to shift the results. But closed primaries could very well lead to short-sighted results that lead to selecting candidates that lose the general election.
All primaries should be totally open. It's that simple. Closed primaries are bad for democracy. It's bad enough that we're stuck with a two party system that really only gives voters two options of a viable candidate to vote for. All voters should have a right to vote in the primary of their choice. If skewing an election is more important to a person that voting FOR a candidate, that should be their right too.
Personally, living in a closed primary state, I changed my registration from Independent to Democrat months ago, so I could vote for Bernie Sanders. Some of the registration deadlines have already closed. Check in your state.