First astronaut - red jelly bean
Second astronaut - green jelly bean
Third astronaut - black jelly bean
From statement 3, you can deduce that the third astronaut did NOT eat the red jelly bean.
Similarly, from statement 1, it can be determined that the second astronaut did not eat the red jelly bean. Therefore the first astronaut ate the red jelly bean.
From 4, then the third did not eat the yellow bean. Therefore they ate the black jelly bean since from 3, the second did not eat the red bean.
From 2, the second ate the green and the yellow bean was uneaten.
Today's brain teaser courtesy of Braingle.com.