The short answer to your question is that psychology can predict behavior to a varying extent. In fact, that's almost what "prediction" means in the world of psychology. When we use the word "prediction" in general conversation, we're usually referring to a type of prediction that is infallible, like that of a person with some uncanny ability to see the future. However, in the world of psychology, prediction can refer to any correlation that is outside of the realm of completely guessing. When we talk about a trait predicting a behavior, what we really indicate is that a trait can be a predictor for a behavior. This is typically based on correlation observed through different subjects.
For example, many psychological studies may focus on a personality trait that may lead to a specific behavior or even action. For example, some psychological studies have shown that people who had heavily structured lives from a very early age may be more likely to show neurotic behavior into adulthood. However, believing that this prediction will be true in every case could be likened to believing that you could predict tomorrow's winning lottery numbers. While psychological prediction can be useful to an extent in regard to studying behavior, it is downright foolish to rely on it to make a prediction that carries any medical weight.
In fact, some psychologists in the 1970s, such as Daryl Bem, began to argue that behavior has far less to do with personality and more to do with the gravity of a situation. For example, if a person saw their doctor several times in a year for extended periods of time in the same environment, they may describe his behavior as cool and collected and assume that this behavior stems from his personality. However, this person would be seeing their doctor in precisely the same situation every time. Psychologists such as Bem argued that this would simply be the way that anyone would act in such a situation and that personality traits may be illusory, not only in regard to predicting behavior but perhaps altogether.