If you have an adult rabbit (over 6 months), it can be neutered straight away, however if your pet is older, it is worth talking to your vet about any additional risks from the anaesthetic and weighing up the pros and cons. Male rabbits may still be fertile for up to 6 weeks after castration so should be kept apart from unspayed females during this time.
If you have a young rabbit, the males can be neutered as soon as the testicles are descended (from about 3 months). If done before sexual maturity, infertility will be instant so they do not need to be kept apart from female rabbits post-operatively.
Female rabbits can be spayed from around 4 months, however the uterus of young rabbits can be very fragile so some vets (including myself) prefer to wait until they are 5 and a half to 6 months of age. If they are housed with another female rabbit, or in with a male who has already been castrated, there is no risk of pregnancy.