In every Transformers continuity, Cybertronians are generally categorized as "male" and "female," if not explicitly then implied with sexual dimorphism and/or pronoun use. At its conception, the Transformers were all men, as they were marketed as "boy toys," and Hasbro believed female characters would be unappealing to young boys (Bob Budiansky Rusting Carcass Interview). Of course, there was pushback to this decision, most importantly within the Transformers' own writing room. Writer Ron Friedman fought to include a female robot because of his daughter's love of "boys" media, and this culminated in the character Arcee, the first female Transformer ("He Killed Optimus Prime: An Interview with Ron Friedman, writer of Transformers: The Movie" from toddmatthy.com). As the Transformers world expanded and split in various continuities, more and more female characters were added. However, the concept and practice of gender on Cybertron is never deeply explored. Why would an alien race of machines have a gender binary, especially the same binary that humanity has created? Obviously the Transformers are not completely alien to us, and do indeed operate as a reflection of humanity, but I believe the role of gender in Transformers has untapped potential to reflect the much greater realm of gender in our world.
As mentioned, Cybertronians are gendered to us physically and through language. Especially in older Transformers media, female bots have feminine bodies: chests pieces shaped like breasts, narrow waists and curvy hips. They are very different from their male counterparts, who are designed more as sexless beings, with more features capturing their alt-mode. Until fairly recently, the women's designs were highly sexualized. In current designs, they are less overtly "female" but often still retain some feminine features: being smaller and thinner than male counterparts, having larger eyes and fuller lips, etc. Additionally, in cartoons and movies, characters' voices reflect their gender. As well as visible differences, in some continuities Transformers are explicitly referred to as female; the first example of this is in episode 53 of the original cartoon, "The Search for Alpha Trion," when Shockwave refers to a group of feminine-presenting bots as "female Autobots." Notably, however, Cybertronians are not a race that reproduces sexaully, and so we can assume they do not have sex organs that reflect human anatomy, if any at all. The gender of these characters appears to be dictated simply by their appearance and the language used in regards to them.
As the majority of Transformers characters are male, most Cybertronians go by he/him. Accordingly, female Transformers use she/her pronouns. One of the most in-depth explorations of gender in Cybertronian culture is conducted with pronoun use and sex in the comic Transformers Spotlight: Arcee. In it, Arcee explains that she was a test subject in an experiment to "arbitrarily introduce gender into [their] species" (page 21). This experiment involved changing Arcee's CNA (a cybernetic equivalent to DNA) to the result of other Cybertronians instinctually using she/her pronouns when referring to her. The comic does not explain the parameters that gender or sex is determined by CNA, or how exactly the experimentation changed Arcee physically. The only difference is that others in her species innately use she/her pronouns for Arcee, while Arcee describes how he/him is "the pronoun of choice" for all other Cybertronians. In this continuity, Transformers are a monosex, potentially sexless species, with the introduction of female characters being considered an abberation. This lore has been justly criticized from a feminist perspective, though there is potential for gender-expansive writing within the world of Transformers: particularly, the idea of a sexless species having a system of gender, and this gender system being primarily defined by language.
Much of Transformers media is written in English, and so the characters follow the English convention of pronoun use and gender. However, this conflicts with the canon that most Transformers media follows: English does not exist as a language on Cybertron. As with many sci-fi stories about an alien race, when characters are speaking their native language, the audience is reading/hearing a translation of what characters are saying. A full Cybertronian language has never been written by creators, although some alphabets were created as a direct substitute for the English alphabet in order to imply the existence of a seperate language. We could presume that the choices of "he" or "she" reflect an equivalent of "he" and "she" in Cybertronian, but including an entirely unique language presents the opportunity to have a unique use of pronouns, and thus a unique expression of gender. This would also address the question some fans have about why a mechanical race that does not reproduce sexually would be male or female--we as an audience are viewing Cybertronians from our perspective, localized in a language we understand. Gender among the Transformers could be a vast landscape distinct from the English text it is based on, distinct from all human structures, something that the sci-fi genre excels at.
There have been some motions into a greater expression of gender in Transformers. Nightshade, a character from the most current cartoon Transformers: Earthspark, is considered the first nonbinary character in the franchise, using they/them pronouns and being voiced by a nonbinary actor. As mainstream culture becomes more aware and accepting of nonbinary identities, so too is Transformers changing its world to reflect that. However, gender is more than using they/them pronouns. I would argue that all Transformers could be nonbinary, regardless of pronoun use, since a binary gender/sex structure doesn't make sense in the fiction of their world. Despite being sexless, gender expression exists on Cybertron, maybe in ways that aren't familiar to human culture. When localized into English, perhaps more Cybertronians use she, they, or neopronouns, and alternations between them. Transformers could be a gender-expansive universe, showing what gender could be beyond our binary.