Seed hardness is an important quality trait of vegetable soybean. To determine the factors underlying seed hardness, two landraces with contrasting seed hardness, Niumaohuang (low seed hardness) and Pixiansilicao (high seed hardness), were selected from 216 soybean accessions originating from 26 provinces in China. The contents of the main components in vegetable soybean seeds such as water, soluble sugar, starch, protein and oil were measured, and transcriptome analyses performed during five stages of seed developmental. Transcriptome analysis indicates that during the middle and late stages of seed development, a large number of genes involved in the synthesis or degradation of starch, storage protein, and fatty acids were differentially expressed, leading to differences in the accumulation of stored substances during seed maturation among Niumaohuang and Pixiansilicao. The activity of cell proliferation and the formation of cell walls in the middle and late stages of seed development may also affect the hardness of seeds to a certain extent. In addition, weighted gene co-expression network analysis (WGCNA) was undertaken to identify co-expressed gene modules and hub genes which regulate seed hardness. Overexpression of a candidate seed hardness regulatory hub gene, GmSWEET2, resulted in increased seed hardness. In this study, the important role of GmSWEET2 in regulating the hardness of vegetable soybean seeds was verified and numerous potential key regulators controlling seed hardness and the proportion of seed components were identified, laying the groundwork for improving the texture of vegetable soybean.