Despite significant progress in food and nutrition security over the past few decades, Bangladesh continues to face challenges, especially in rural areas. This study investigates the relationship between socioeconomic determinants and household dietary diversity using three waves of nationally representative longitudinal data from the Bangladesh Integrated Household Survey (2011/2012, 2015, and 2018/2019). Dietary diversity was measured using the Household Dietary Diversity Score (HDDS) and the Food Variety Score (FVS), both indicators of dietary diversity and food security. We employed a Poisson fixed-effects regression model with robust standard errors to model the dietary diversity indicators, appropriate for the count nature of the data. The results show that households where the head is engaged in farming have, on average, a 1.4% higher HDDS and a 2.17% higher FVS compared to non-farming households. Households where the head has primary or lower education demonstrate a 2.11% increase in HDDS, while those with secondary or higher education experience a 2.05% increase compared to households with no formal education. Additionally, each extra household member increases FVS by 5.5%. Cultivable land, as well as access to essential resources like water and electricity, significantly affects dietary diversity. Economic factors, such as higher food and non-food expenditures per capita, also exhibit strong positive associations with dietary diversity. These findings emphasize the importance of socioeconomic factors and household dynamics in shaping dietary quality. Policy interventions should prioritize educational programs to enhance nutrition knowledge and promote sustainable agricultural practices to support farmers. Aligning with the Sustainable Development Goals (SDGs), particularly SDG 2 on zero hunger and SDG 3 on health and well-being, these insights contribute to ongoing efforts to improve food security and dietary diversity in rural communities.