The first and foremost consideration that should drive the specification of random effects in a mixed effects model is the study design. Here are some examples that illustrate how the design affects the model specification.
If you have a study in which you randomly selected patients from a target population of patients and measured an outcome variable (e.g., CD4 cell count) at several time points, along with time-varying and/or time-invarying predictor variables, then you would want to include at a minimum a random patient effect (i.e., a random patient intercept) to account for the natural nesting of repeated outcome observations within a patient.
If you have a study in which you randomly selected a set of hospitals from a target population of hospitals, and then you randomly selected a set of patients from each hospital such that each patient would provide multiple measurements for an outcome variable (e.g., CD4 count), then you would need to include (at a minimum) a random hospital effect and a random patient effect in your model.
In the first example, patient is a random grouping factor. In the second example, hospital and patient are random grouping factors, with patient nested within hospital (since the patients randomly selected within a hospital are unique to that hospital and will not appear in any other hospital).
In some study designs, it is possible to have either fully crossed or partially crossed random grouping factors. For instance, you could have a study where some patients end up attending multiple hospitals throughout the duration of the study, in which case the patient and hospital would likely be partially crossed random grouping factors.
So paying attention to the study design helps identify the random grouping factors, each of which will be allowed its own random set of intercepts in the model - one intercept per level of random grouping factor.
The second consideration in the mixed effects model specification is to think about what predictor variables in the model can have varying (or random) effects across the levels of the grouping factor(s).
For Example 1, let's assume we measured the predictor blood pressure for each patient at all the time points where we also measured the outcome variable CD4 cell count - there were 4 time points per patient (say, once a week, for a total of 4 weeks). Let's also assume we measured the predictor gender. The blood pressure values will change from one week to the other for each patient, in tandem with the values of the CD4 cell counts. If we have reasons to believe that the association between CD4 counts and blood pressure values will be different from patient to patient, then we can allow the slope of blood pressure in the model to vary randomly across patients - we can achieve this by including a random effect of blood pressure in the model. The gender value will not change from one week to another for a patient, so there is no need to allow for a random effect of gender in our model. In the context of this example, we say that blood pressure is a within-patient (or within-subject) predictor variable, whereas gender is a between-patients (or between-patients) predictor variable. Only within-patient predictor variables can be allowed to have varying (or random) effects across the levels of the corresponding random grouping factor.
For Example 2, we can have predictor variables that refer to the hospitals included in the study (e.g., type of hospital) and/or predictor variables that refer to the patients within those hospitals (e.g., patient gender, patient blood pressure). The patient-specific predictor variables, for instance, can be within-patient predictors whose values change from occasion to occasion for the same patient, or between-patient predictors, whose values are invariant to occasion for each patient but change from one patient to another. The within-patient predictors can have varying (or random) effects across patients, etc.
So the inclusion of random effects in your model ultimately depends on whether your study design includes any random grouping factor (e.g., patient, hospital) and whether you have predictor variables whose effects can be assumed to vary across the levels of these random grouping factors.