Weed invasion of crop fields, such as maize, is a major threat leading to yield reductions or crop right-offs for smallholder farming, especially in developing countries. A synoptic view and timeous detection of weed invasions can save the crop. The sustainable development goals (SDGs) have identified food security as a major focus point. The objectives of this study are to: (1) assess the precision of mapping maize-weed infestations using multi-temporal, unmanned aerial vehicle (UAV), and PlanetScope data by utilizing machine learning algorithms, and (2) determine the optimal timing during the maize growing season for effective weed detection. UAV and PlanetScope satellite imagery were used to map weeds using machine learning algorithms—random forest (RF) and support vector machine (SVM). The input features included spectral bands, color space channels, and various vegetation indices derived from the datasets. Furthermore, principal component analysis (PCA) was used to produce principal components (PCs) that served as inputs for the classification. In this study, eight experiments are conducted, four experiments each for UAV and PlanetScope datasets spanning four months. Experiment 1 utilized all bands with the RF classifier, experiment 2 used all bands with SVM, experiment 3 employed PCs with RF, and experiment 4 utilized PCs with SVM. The results reveal that PlanetScope achieves accuracies below 49% in all four experiments. The best overall performance was observed for experiment 1 using the UAV based on the highest mean accuracy score (>0.88), which included the overall accuracy, precision, recall, F1 score, and cross-validation scores. The findings highlight the critical role of spectral information, color spaces, and vegetation indices in accurately identifying weeds during the mid-to-late stages of maize crop growth, with the higher spatial resolution of UAV exhibiting a higher precision in the classification accuracy than the PlanetScope imagery. The most optimal stage for weed detection was found to be during the reproductive stage of the crop cycle based on the best F1 scores being indicated for the maize and weeds class. This study provides pivotal information about the spatial distribution of weeds in maize fields and this information is essential for sustainable weed management in agricultural activities.