Wind energy is one of the renewable energy sources like solar energy, and accurate wind power prediction can help countries deploy wind farms at particular locations yielding more electricity. For any prediction problem, determining the optimal time step (lookback) information is of primary importance, and using information from previous timesteps can improve the prediction scores. This article uses simulated annealing to find an optimal time step for wind power prediction. Finding an optimal timestep is computationally expensive and may require brute-forcing to evaluate the deep learning model at each time. This article uses simulated annealing to find an optimal time step for wind power prediction. The computation time was reduced from 166 hours to 3 hours to find an optimal time step for wind power prediction with a simulated annealing-based approach. We tested the proposed approach on three different wind farms with a training set of 50%, a validation set of 25%, and a test set of 25%, yielding MSE of 0.0059, 0.0074, and 0.010 for each wind farm. The article presents the results in detail, not just the mean square root error.