Okay first off you don't need favours at all. No one will care. It's a new thing fuelled by the crazy expensive wedding industry. They're a nice touch but if nothing springs to mind or it's an unneeded expense then don't do them!
The traditional favour is simply sugared almonds, so this is always acceptable, whether in a bag or jar or small box. You could even take this a step further and have a sweetie pick and mix table as guests leave and give them each a pretty patterned paper bag (could double as a place setting) for them to fill as they leave. Call it a taxi/going home snack, or something.
Another thing you could do if you're short on money is to write everyone a small handwritten note and put it in an envelope thanking them for coming and writing something personal about what it means to you that they're there. A great deal more meaningful that a lottery ticket, I think. Again, they can also double as place cards. Oh and Paperchase do the cutest miniature envelopes that would be perfect.
In fact, you could do many variations of the place card/favour double act. We're having shells with names written inside as place settings and they make nice keepsakes too. The shells were incredibly cheap too.
You could have seeds in a small bag. Perhaps representing something important, perhaps just a lovely flower or plant.
A slightly more expensive option is to get a Mr Men or Little Miss book that suits each person perfectly and give them that. It's funny and cute and they don't even have to be new books, you could get them second hand, it doesn't make it any less special. People love things like that.
You could have a small matchbox sized box of table games for each person, just make the box pretty. Perhaps a quiz about the bride and groom, or funny questions to ask the person next to you. Very cheap and loads of fun.
A small bag of herbs (lavender is great) with a note, perhaps if you were using lavender then 'it means the world to us that you shared our wedding day with us, sleep well'. Very cheap (you can buy lavender in bulk for next to nothing) and makes a lovely gift. You could even print or embroider on the bags if you're good at that sort of thing.
Another slightly more expensive idea is to source funny hats like old bowler hats and things from charity shops and give each person one. People love dressing up and being silly for weddings, and it removes the need for a photobooth. A cheaper option is to just print paper masks or even just glasses/moustaches on sticks. A variation is to give men bowler/top hats and women flower crowns.
Buy small bottles, I mean the tiny 1.5inch high ones, and find a recipe on Pinterest for making simple perfume or scented oil. It's such a lovely and unique gift and again, you can decorate the bottle.
If you can make jam or have a signature cocktail or someone in your family does then hand them out! You don't have to make a huge bottle of cocktail, two shot glasses worth would be adorable. This works with anything really; shortbread, biscuits, fairycakes...
On the subject of food, a really lovely idea is to pack a small box as a midnight snack for each guest as they're leaving. You could get a very simple box and write a personal message of thanks on it and tie it with ribbon, and inside have something cheap and cheerful like a 12p Asda pasty and a small cake. It will be much needed at 12am!
That's all I can think of for now but I have a brainwave I'll let you know!