Signs of an unhappy budgie include withdrawn behavior, excessive sleeping or inactivity, feather plucking, aggression, loss of appetite, changes in vocalizations, tail bobbing, and increased anxiety or fear.
If you suspect your budgie is unhappy, consult a veterinarian to rule out health problems. Then provide a comfortable environment, attention, exercise, and socialization.