It is not always an easy decision to make on whether or not the defendant should take the stand in a criminal trial.
First, who makes the decision? Well, ultimately the defendant decides since it is his trial, but in my experience they almost always do what their attorney suggests since they have the necessary experience to know what is best. Second, does it look bad if the defendant doesn’t take the stand? Legally, is is not not supposed to because of the 5th Amendment, which states (among other things) “no person … shall be compelled in any criminal case to be a witness against himself.” Hence, if the defendant does not take the stand, it cannot be held against them by the trier of fact, whether it is a judge or jury. (In jury selection, potential jurors are asked if they can follow this principle; if they can’t then they are automatically eliminated as a potential juror.) However, who knows in reality if the trier of fact wonders if the defendant has something to hide (or the like) if they don’t take the stand.
Third, what factors determine whether the defendant takes the stand? Many: 1. how strong was the case the prosecution presented (?); 2. does the defendant have any relevant helpful information to add that only they can provide like in a “he said, she said” type case (?); 3. does the defendant have a prior record that is legally allowed to come in as evidence and is it bad enough to hurt them (?); 4. how articulate, intelligent, or likeable is the defendant (?); 5. will the defendant come across as believable and honest during their testimony (?); 6. how well will the defendant handle a good cross examination by the prosecution (?). In general, defense attorneys will not put the defendant on the stand if the prosecution presented a weak case because it is not worth the risk since most defendants are not good on the stand. Conversely, if the prosecution presented a very strong case and the defendant has valuable information to present, then there is little risk in putting the defendant on the stand. More often than not, the defendant does not end up taking the stand in a criminal case.