There are no general rules. Here are some rough guidelines:
Some characters are used almost exclusively for one gender. For example, almost any character containing 女 will generally only be found in women's names. This is particularly true for names like 娟娟, where the 女 radical is part of the meaning. Common characters like 安 or 好 can appear in male names just as easily, despite the fact that they have the 女 radical.
Names that reference flowers, precious stones or beauty, as well as "cute" names are more likely to be women's names. Names that sound grandiose or political are more likely to be men's names. Some characters that strongly point towards a feminine name are 玲 (líng, a word relating to jewelry), 瑩 (yíng, a precious stone), 蓉 (róng, hibiscus flower), as well as 彤 (tóng, red), 美, 麗, 佳, and 艷, all of which mean "beautiful". Conversely, some male-specific characters are 宇 (yú, space), 勇 (brave), 昊 (hào, vast) as well as 囯, 大, 東 and 平.
Once you get used to hearing Chinese men's and women's names, you will become better at guessing which is which. Some sounds and combinations of sounds are more common in one than the other, although that would be too complex to list here.
However, in Chinese there are no formal rules about names, and any family can name their child whatever they like, even if the name does not match the child's gender. So there is no definitive way to identify a person's gender from their name -- not even for Chinese people themselves.