It is generally better to lift before basketball because it will allow you to have more energy for your workout.  If you are lifting at home or another place that does not have a weight room, then it would be best to lift after playing so as not to waste energy on the court.