I'm a big fan of a well-funded military. Aside from the importance in providing safety and stability against outside intrusion, for better or worse, the power of the US military plays a huge role in the US's world strength: the US would never be able to sustain it's economic and political position if it did not have the most powerful military in the world, and achieving that requires massive funding. In addition, if that funding is properly spent, it goes back into the US economy, boosting the R&D and manufacturing capabilities, and can attract foreign trade as well (in the form of sale of military hardware).
That said, there are three major caveats. The first is proper spending. The F-35? Yeah, not only are we wasting massive amounts of money on a unified platform that doesn't work as well for any job as a dedicated one, the cost and time overruns means more and more potential buyers are switching to the Eurofighter or similar. The problem isn't that the military doesn't have enough money: it's that it isn't being spent properly. Instead of being spent in the best interest of the US, it's spent in the best interest of the politicians who use it as political capital, and in the best interests of the corporations who support them.
The second caveat is that the US military isn't just well-funded, it's vastly overfunded. A well-funded military is a solid bulwark necessary for the US and it's interests. An overfunded military is a waste of money and, if anything, ends up leading to a weaker military (since money ends up being poured into pork instead of into providing what the military actually needs).
Finally, again for better or worse, a well-funded NASA is more or less just as necessary to the long-term military interests of the US as the actual military is. Space is the next major frontier for warfare, and whether there is an open war on earth, or just proxy wars and scrabbles over the resources of space, without a well-funded and developed space program the US is going to be at a massive military disadvantage in 20-50 years (or sooner).