Identification of optimal spectral bands often involves collecting in-field spectral signatures followed by thorough analysis. Such rigorous field sampling exercises are tedious, cumbersome, and often impractical on challenging terrain, which is a limiting factor for programmable hyperspectral sensors mounted on unmanned aerial vehicles (UAV-hyperspectral systems), requiring a pre-selection of optimal bands when mapping new environments with new target classes with unknown spectra. An innovative workflow has been designed and implemented to simplify the process of in-field spectral sampling and its realtime analysis for the identification of optimal spectral wavelengths. The band selection optimization workflow involves particle swarm optimization with minimum estimated abundance covariance (PSO-MEAC) for the identification of a set of bands most appropriate for UAV-hyperspectral imaging, in a given environment. The criterion function, MEAC, greatly simplifies the in-field spectral data acquisition process by requiring a few target class signatures and not requiring extensive training samples for each class. The metaheuristic method was tested on an experimental site with diversity in vegetation species and communities. The optimal set of bands were found to suitably capture the spectral variations between target vegetation species and communities. The approach streamlines the pre-tuning of wavelengths in programmable hyperspectral sensors in mapping applications. This will additionally reduce the total flight time in UAV-hyperspectral imaging, as obtaining information for an optimal subset of wavelengths is more efficient, and requires less data storage and computational resources for post-processing the data.