Vodafone - dial 191 for customer care, select option 2, then option 1 and they'll send you a text message. or use My Vodafone on their website.
O2 - don't thin you can without calling customer services or dropping them an email - could be wrong though as its a few years since I had an O2 contract.
Just logged onto a mates online bill (with his permission) and found it, if you log on to online billing, click "unbilled summary" and then "inclusive allownace details" it gives it to you.
Thats if you have O2 as your service provider though. I had singlepoint when I was with them and had no way of checking my allowance at all without phoning them