Lets be honest, this country uses a lot of their funds wrong. Most things seem to go to the wealthy and not so much to the people who could really use them. Farm subsidies are given mostly to wealthy farmers and the poor farmers get a lot less help. Keeping your own people poor is bad for national security because it could one day have a chain reaction effect.
The question of whether one budget item impacts any other budget item can always be answered with a 'yes'. Spending a dollar on one thing means that you cannot spend a dollar on some other thing. Even looking past opportunity costs, farm subsidies both help national security (by securing our own food sources even if doing so wastefully) as well as hurting national security (by destabilizing our neighbor's economies with our overly cheap food exports).
Sustaining farms with a subsidy is altogether an entirely different issue than national security. One issue is dealing with world economy and the U.S. farmer's ability to compete in selling their product and the other issue is dealing with boarder security, weapons, and foreign relations. Farm subsidies will not have an impact on national security.
Farm subsidies and national security have little, or nothing to do with one another. Spending on the former does not effect the later. Our congress spends like drunken sailors so claims that higher subsidies decreases spending on security is a political argument that lacks logical basis.
Farm subsidies may, slightly, enhance security as it encourages farmers to keep land designated as farm land despite it not being very profitable.