How do I connect a chandelier to this ceiling wiring?
You would need to test to verify, but it looks like the black is a constant hot  with the red being the switch leg. 

So to connect a chandelier you'd use the red (hot), white (neutral) and ground.