That type of hood exists centuries before the creation of the kkk in the US, and is used all over Spain on the Easter processions. The hoods are not only white, but purple, red,... depending on the "cofradía".
Like Stephen told, they are penitents. I'm not into that type of celebration though, cuz they're generally performed by ultra-catholic believers.