The term 男生 is deeply tied to the structure of social life in China, which places immense importance on education. A person's identity from ages 6 to 22 (and beyond) is often primarily that of a “student” (学生, xuéshēng). 男生 and its counterpart 女生 (nǚshēng) are the default gendered labels within this significant life phase.
A helpful comparison is with the English words “boy” and “guy.”
“Boy” in English can sound diminutive or childish when referring to someone in their late teens or early twenties.
“Guy” in English is very casual and can refer to a male of almost any age.
男生 (nánshēng) fits neatly in between. It is the standard, neutral term for a male who has not yet fully entered the workforce and taken on adult social responsibilities. The transition from being called a 男生 to a 男人 (nánrén), or “man,” is a significant social milestone. It marks a shift from the world of youth and education to the world of career, family, and societal responsibility.
男生 is an extremely common, neutral term used in a wide variety of daily situations.
In School and University Settings: This is its most frequent context. Students use it to refer to their male classmates, dormmates, and peers.
General Daily Conversation: People use it to describe a young male they see in public.
Relationships and Socializing: It's used when talking about dating or crushes among young people.
Describing Products: In commerce, it can be used to label items for a younger male demographic.
The term is neutral in connotation and can be used in both informal and semi-formal contexts without issue.