This reminds me of doing A Level Philosophy last year; probably spent at least a good couple of weeks on whether it's moral to kill animals...
There's so many different theories related to it, and so many different things to consider (is killing animals for meat different to killing animals out of 'self defence', for sport, etc.) and so on.
Personally, with regards to ants, I think they are still sentient animals - they can perceive or be conscious of themselves to some degree. Whether that's scientifically true or not I don't really know, but they're living creatures, so surely there must be some form of sentience about them? And, personally, I think it's 'morally wrong' (whatever that means) to kill anything sentient, so in a way, it is morally wrong to kill ants.
However, that's not a general case. I do think if they're annoying you in some way (invading your picnic, camping out in your kitchen, etc.), it would be best to kill them. It's affecting your general happiness, and so killing them is going to increase your own happiness, and isn't going to make ants any unhappier really. Probably worth saying here that I'd say it's not morally okay to kill another human if they're simply annoying you, because it will likely cause more unhappiness then happiness. Yeah, probably sounds a bit confusing now...
tl;dr - It's morally wrong to kill ants for the lolz, but if they're really annoying you, it's pretty much okay.